Merge branch 'master' of http://llvm.org/git/llvm
Don't repeat name in comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221664 91177308-0d34-0410-b5e6-96231b3b80d8
Don't duplicate names in comments. NFC.

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

This adds const to a few methods that already return const references or
creates a const version when they reterun non-const references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221666 91177308-0d34-0410-b5e6-96231b3b80d8
MCAsmParserExtension has a copy of the MCAsmParser. Use it.

Base classes were storing a second copy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221667 91177308-0d34-0410-b5e6-96231b3b80d8
[NVPTX] Remove dead code in NVPTXTargetTransformInfo (NFC)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221668 91177308-0d34-0410-b5e6-96231b3b80d8
Only run the gold plugin tests if gold supports the targets we test with.

This fixes pr21345.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221669 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] Fix pattern match for 32-to-64-bit zext in the presence of AssertSext

This fixes an issue with matching trunc -> assertsext -> zext on x86-64, which would not zero the high 32-bits. See PR20494 for details.
Recommitting - This time, with a hopefully working test.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221672 91177308-0d34-0410-b5e6-96231b3b80d8
Use uint64_t as the type for the X86 TSFlag format enum. Allows removal of the VEXShift hack that was used to access the higher bits of TSFlags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221673 91177308-0d34-0410-b5e6-96231b3b80d8
Addition to r216371 (SLP and Loop Vectorization) and r218607 where
cost model for signed division by power of 2 was improved for AArch64.
The revision r218607 missed test case for Loop Vectorization.
Adding it in this revision.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221674 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] llvm-shlib: Prune redundant components, AsmPrinter, MC, and SelectionDAG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221675 91177308-0d34-0410-b5e6-96231b3b80d8
MC, COFF: Use relocations for function references inside the section

Referencing one symbol from another in the same section does not
generally require a relocation.  However, the MS linker has a feature
called /INCREMENTAL which enables incremental links.  It achieves this
by creating thunks to the actual function and redirecting all
relocations to point to the thunk.

This breaks down with the old scheme if you have a function which
references, say, itself.  On x86_64, we would use %rip relative
addressing to reference the start of the function from out current
position.  This would lead to miscompiles because other references might
reference the thunk instead, breaking function pointer equality.

This fixes PR21520.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221678 91177308-0d34-0410-b5e6-96231b3b80d8
Was convinced in commit comments that requiring a specific python version is the wrong approach; reverting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221679 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-objdump: Skip empty sections when dumping contents

Empty sections are just noise when using objdump.
This is similar to what binutils does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221680 91177308-0d34-0410-b5e6-96231b3b80d8
Recommit "[mips] Add names and tests for the hardware registers"

The original commit r221299 was reverted in r221307.  I removed the name
"hrw_ulr" ($29) from the original commit because two tests were failing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221681 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] Add missing check for 'isINSERTPSMask' in method 'isShuffleMaskLegal'.

This helps the DAGCombiner to identify more opportunities to fold shuffles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221684 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Add hardware register name "hwr_ulr" ($29)

The canonical name when printing assembly is still $29. The reason is that
GAS does not accept "$hwr_ulr" at the moment.

This addresses the comments from r221307, which reverted the original
commit r221299.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221685 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Add preliminary support for the MIPS II target.

Summary:
This patch enables code generation for the MIPS II target. Pre-Mips32
targets don't have the MUL instruction, so we add the correspondent
pattern that uses the MULT/MFLO combination in order to retrieve the
product.

This is WIP as we don't support code generation for select nodes due to
the lack of conditional-move instructions.

Reviewers: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221686 91177308-0d34-0410-b5e6-96231b3b80d8
LLVM incorrectly folds xor into select

LLVM replaces the SelectionDAG pattern (xor (set_cc cc x y) 1) with
(set_cc !cc x y), which is only correct when the xor has type i1.
Instead, we should check that the constant operand to the xor is all
ones.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221693 91177308-0d34-0410-b5e6-96231b3b80d8
[X86][ELF] Fix PR20243 - leaf frame pointer bug with TLS access

The ISel lowering for global TLS access in PIC mode was creating a pseudo 
instruction that is later expanded to a call, but the code was not 
setting the hasCalls flag in the MachineFrameInfo alongside the adjustsStack 
flag. This caused some functions to be mistakenly recognized as leaf functions,
and this in turn affected the decision to eliminate the frame pointer.

With the fix, hasCalls is properly set and the leaf frame pointer is correctly
preserved.




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