X86MCAsmInfoGNUCOFF: Set PointerSize as 8 for targeting x64. It caused DW_LNE_set_address was misemitted on x64.

FIXME: I haven't investigate whether CalleeSaveStackSlotSize should be 8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205772 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for optimization reports.

Summary:
This patch adds backend support for -Rpass=, which indicates the name
of the optimization pass that should emit remarks stating when it
made a transformation to the code.

Pass names are taken from their DEBUG_NAME definitions.

When emitting an optimization report diagnostic, the lack of debug
information causes the diagnostic to use "<unknown>:0:0" as the
location string.

This is the back end counterpart for

http://llvm-reviews.chandlerc.com/D3226

Reviewers: qcolombet

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3227

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205774 91177308-0d34-0410-b5e6-96231b3b80d8
Add -pass-remarks flag to 'opt'.

Summary:
This adds support in 'opt' to filter pass remarks emitted by
optimization passes. A new flag -pass-remarks specifies which
passes should emit a diagnostic when LLVMContext::emitOptimizationRemark
is invoked.

This will allow the front end to simply pass along the regular
expression from its own -Rpass flag when launching the backend.

Depends on D3227.

Reviewers: qcolombet

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3291

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205775 91177308-0d34-0410-b5e6-96231b3b80d8
Verifier: Give the right message for bad atomic loads

Talk about load (not store) on an invalid atomic load.

<rdar://problem/16287567>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205777 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the ARM VLD3 (single 3-element structure to all lanes)
size 16 double-spaced registers instruction printing.

This:
	vld3.16 {d0[], d2[], d4[]}, [r4]!

was being printed as:

	vld3.16	{d0[], d1[], d2[]}, [r4]!

rdar://16531387


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205779 91177308-0d34-0410-b5e6-96231b3b80d8
[PowerPC] Don't return false from PPC::isVSLDOIShuffleMask

PPC::isVSLDOIShuffleMask should return -1, not false, when the shuffle
predicate should be false.

Noticed by inspection; no test case (yet).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205787 91177308-0d34-0410-b5e6-96231b3b80d8
RegAlloc: Account for a variable entry block frequency

Until r197284, the entry frequency was constant -- i.e., set to 2^14.
Although current ToT still has a constant entry frequency, since r197284
that has been an implementation detail (which is soon going to change).

  - r204690 made the wrong assumption for the CSRCost metric.  Adjust
    callee-saved register cost based on entry frequency.

  - r185393 made the wrong assumption (although it was valid at the
    time).  Update SpillPlacement.cpp::Threshold to be relative to the
    entry frequency.

Since ToT still has 2^14 entry frequency, this should have no observable
functionality change.

<rdar://problem/14292693>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205789 91177308-0d34-0410-b5e6-96231b3b80d8
[Constant Hoisting][ARM64] Enable constant hoisting for ARM64.

This implements the target-hooks for ARM64 to enable constant hoisting.

This fixes <rdar://problem/14774662> and <rdar://problem/16381500>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205791 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] Fix up some links to the preferred style.

:doc:`...` and :ref:`...` links help Sphinx keep track the dependencies
between documents and ensure that they are not pointing to nowhere.

Raw HTML links work just fine and are easier for people less familiar
with reST/Sphinx. They are easy to change over to the :doc:/:ref: style
after the fact so this is not a problem.

This commit doesn't fix all of them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205792 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] VCS contains a record of authorship

No need to explicitly mention the author in the document.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205793 91177308-0d34-0410-b5e6-96231b3b80d8
in findGCD of multiply expr return the gcd

we used to return 1 instead of the gcd

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205800 91177308-0d34-0410-b5e6-96231b3b80d8
handle special cases when findGCD returns 1

used to fail with 'Step should divide Start with no remainder.'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205801 91177308-0d34-0410-b5e6-96231b3b80d8
divide by the result of the gcd

used to fail with 'Step should divide Start with no remainder.'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205802 91177308-0d34-0410-b5e6-96231b3b80d8
Bug 19348: Check for legal ExtLoad operation before folding

(aext (zextload x)) -> (aext (truncate (*extload x)))

Patch by Stanislav Mekhanoshin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205805 91177308-0d34-0410-b5e6-96231b3b80d8
WinCOFF: Emit common symbols as specified in the COFF spec

Summary:
Local common symbols were properly inserted into the .bss section.
However, putting external common symbols in the .bss section would give
them a strong definition.

Instead, encode them as undefined, external symbols who's symbol value
is equivalent to their size.

Reviewers: Bigcheese, rafael, rnk

CC: llvm-commits

Differential Revision: http://reviews.llvm.org/D3324

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205811 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205829 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] Make use of 'nullptr' in TableGen library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205830 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205831 91177308-0d34-0410-b5e6-96231b3b80d8
ARM MC: sort source files in CMakeLists

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205832 91177308-0d34-0410-b5e6-96231b3b80d8
ARM MC: 80 column

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205833 91177308-0d34-0410-b5e6-96231b3b80d8