oota-llvm.git
10 years agoRename many DataLayout variables from TD to DL.
Rafael Espindola [Fri, 21 Feb 2014 00:06:31 +0000 (00:06 +0000)]
Rename many DataLayout variables from TD to DL.

I am really sorry for the noise, but the current state where some parts of the
code use TD (from the old name: TargetData) and other parts use DL makes it
hard to write a patch that changes where those variables come from and how
they are passed along.

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

10 years agoStackmaps are used for OSR exits, which is a custom kind of unwinding. Hence, they
Filip Pizlo [Thu, 20 Feb 2014 23:57:31 +0000 (23:57 +0000)]
Stackmaps are used for OSR exits, which is a custom kind of unwinding. Hence, they
should not be marked nounwind.

Marking them nounwind caused crashes in the WebKit FTL JIT, because if we enable
sufficient optimizations, LLVM starts eliding compact_unwind sections (or any unwind
data for that matter), making deoptimization via stackmaps impossible.

This changes the stackmap intrinsic to be may-throw, adds a test for exactly the
sympton that WebKit saw, and fixes TableGen to handle un-attributed intrinsics.

Thanks to atrick and philipreames for reviewing this.

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

10 years agoMake sure that value handle users see the transformation of an indirect call to a...
Nick Lewycky [Thu, 20 Feb 2014 23:00:15 +0000 (23:00 +0000)]
Make sure that value handle users see the transformation of an indirect call to a direct call. This is important for the CallGraph iteration. Patch by Björn Steinbrink!

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

10 years agoSet the SuppressWarnings option on tool level and propagate to the library.
Eli Bendersky [Thu, 20 Feb 2014 22:19:24 +0000 (22:19 +0000)]
Set the SuppressWarnings option on tool level and propagate to the library.

The SuppressWarnings flag, unfortunately, isn't very useful for custom tools
that want to use the LLVM module linker. So I'm changing it to a parameter of
the Linker, and the flag itself moves to the llvm-link tool.

For the time being as SuppressWarnings is pretty much the only "option" it
seems reasonable to propagate it to Linker objects. If we end up with more
options in the future, some sort of "struct collecting options" may be a
better idea.

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

10 years agocstdint is a C++11 header, LLVM provides its own version of it.
Benjamin Kramer [Thu, 20 Feb 2014 21:05:21 +0000 (21:05 +0000)]
cstdint is a C++11 header, LLVM provides its own version of it.

Some versions of libstdc++ forbid using cstdint in C++98 mode.

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

10 years ago[Support] Correctly handle zero length inputs to UTF conversion functions on Windows.
Michael J. Spencer [Thu, 20 Feb 2014 20:46:23 +0000 (20:46 +0000)]
[Support] Correctly handle zero length inputs to UTF conversion functions on Windows.

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

10 years agotest_debuginfo.pl: Make failures easier to debug by printing the debugger
Adrian Prantl [Thu, 20 Feb 2014 19:55:44 +0000 (19:55 +0000)]
test_debuginfo.pl: Make failures easier to debug by printing the debugger
output.

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

10 years agoFix build breakage.
Rui Ueyama [Thu, 20 Feb 2014 19:32:00 +0000 (19:32 +0000)]
Fix build breakage.

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

10 years agoObject/COFF: Fix possible truncation bug.
Rui Ueyama [Thu, 20 Feb 2014 19:14:56 +0000 (19:14 +0000)]
Object/COFF: Fix possible truncation bug.

VA can be 64 bit, as the image base can be larger than 4GB, so we need to
handle 64 bit VAs properly.

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

10 years agoRemove unnecessary copy of array_lengthof.
Benjamin Kramer [Thu, 20 Feb 2014 17:36:31 +0000 (17:36 +0000)]
Remove unnecessary copy of array_lengthof.

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

10 years agoAArch64: __va_list.__stack must be 8-byte aligned
Oliver Stannard [Thu, 20 Feb 2014 17:19:26 +0000 (17:19 +0000)]
AArch64: __va_list.__stack must be 8-byte aligned

The va_start macro for AArch64 must set va_list.__stack to the address
following the last named argument on the stack, rounded up to an alignment
of 8 bytes.

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

10 years ago[AArch64] Add support for TargetTransformInfo Analysis.
Chad Rosier [Thu, 20 Feb 2014 16:00:08 +0000 (16:00 +0000)]
[AArch64] Add support for TargetTransformInfo Analysis.

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

10 years ago[mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler.
Daniel Sanders [Thu, 20 Feb 2014 14:58:19 +0000 (14:58 +0000)]
[mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler.

Summary:
This removes the need to coerce UnknownABI to the default ABI (O32 for
MIPS32, N64 for MIPS64 [*]) in both MipsSubtarget and MipsAsmParser.

Clang has been updated to disable both possible default ABI's before enabling
the ABI it intends to use.

[*] N64 being the default for MIPS64 is not actually correct.
    However N32 is not fully implemented/tested yet.

Depends on: D2830

Reviewers: jacksprat, matheusalmeida

Reviewed By: matheusalmeida

Differential Revision: http://llvm-reviews.chandlerc.com/D2832
Differential Revision: http://llvm-reviews.chandlerc.com/D2846

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

10 years ago[CMake] Move intrinsics_gen to lib/Target out of add_public_tablegen_target.
NAKAMURA Takumi [Thu, 20 Feb 2014 13:42:30 +0000 (13:42 +0000)]
[CMake] Move intrinsics_gen to lib/Target out of add_public_tablegen_target.

add_public_tablegen_target is used somewhere.

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

10 years ago[CMake] intrinsics_gen: Use add_public_tablegen_target().
NAKAMURA Takumi [Thu, 20 Feb 2014 13:42:16 +0000 (13:42 +0000)]
[CMake] intrinsics_gen: Use add_public_tablegen_target().

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

10 years agoAsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.
Benjamin Kramer [Thu, 20 Feb 2014 13:36:32 +0000 (13:36 +0000)]
AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.

There is code in the wild that relies on $0 not being expanded.

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

10 years ago[mips] Make mips64 the default CPU for the mips64 architecture
Daniel Sanders [Thu, 20 Feb 2014 13:13:33 +0000 (13:13 +0000)]
[mips] Make mips64 the default CPU for the mips64 architecture

Summary:
This is consistent with the integrated assembler.
All mips64 codegen tests previously passed -mcpu. Removed -mcpu from
blez_bgez.ll and const-mult.ll to cover the default case.

Ideally, the two implementations of selectMipsCPU() will be merged but it's
proven difficult to find a home for the function that doesn't cause link errors.
For now, we'll hoist the common functionality into a function and mark it with
FIXME's.

Reviewers: jacksprat, matheusalmeida

Reviewed By: matheusalmeida

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

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

10 years agoUnconditionally include msan_interface.h when building with MSan.
Evgeniy Stepanov [Thu, 20 Feb 2014 11:37:03 +0000 (11:37 +0000)]
Unconditionally include msan_interface.h when building with MSan.

Any version of Clang that does not provide this header is way too old to
bootstrap with MSan.

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

10 years agoAdded release note about making all inline assembly parsed (even for assembly
Daniel Sanders [Thu, 20 Feb 2014 09:24:15 +0000 (09:24 +0000)]
Added release note about making all inline assembly parsed (even for assembly
output) when the integrated assembler is enabled.

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

10 years agoCOFFObjectFile.cpp: Appease msvc in r201760.
NAKAMURA Takumi [Thu, 20 Feb 2014 09:16:23 +0000 (09:16 +0000)]
COFFObjectFile.cpp: Appease msvc in r201760.

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

10 years ago[x86] Switch PAUSE instruction to use XS prefix instead of HasREPPrefix. Remove HasRE...
Craig Topper [Thu, 20 Feb 2014 07:59:43 +0000 (07:59 +0000)]
[x86] Switch PAUSE instruction to use XS prefix instead of HasREPPrefix. Remove HasREPPrefix support from disassembler table generator since its now only used by CodeGenOnly instructions.

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

10 years agoAVX-512: added a lit test for truncate operation
Elena Demikhovsky [Thu, 20 Feb 2014 07:34:13 +0000 (07:34 +0000)]
AVX-512: added a lit test for truncate operation

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

10 years agoAVX-512: Fixed compilation issue
Elena Demikhovsky [Thu, 20 Feb 2014 07:00:10 +0000 (07:00 +0000)]
AVX-512: Fixed compilation issue

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

10 years agollvm-objdump/COFF: Print SEH table addresses.
Rui Ueyama [Thu, 20 Feb 2014 06:51:07 +0000 (06:51 +0000)]
llvm-objdump/COFF: Print SEH table addresses.

SEH table addresses are VA in COFF file. In this patch we convert VA to RVA
before printing it, because dumpbin prints them as RVAs.

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

10 years agoFix change in behaviour accidentally introduced in r201754.
Nick Lewycky [Thu, 20 Feb 2014 06:35:31 +0000 (06:35 +0000)]
Fix change in behaviour accidentally introduced in r201754.

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

10 years agoAVX-512: Assembly parsing of broadcast semantic in AVX-512; imlemented by Nis Zinovy...
Elena Demikhovsky [Thu, 20 Feb 2014 06:34:39 +0000 (06:34 +0000)]
AVX-512: Assembly parsing of broadcast semantic in AVX-512; imlemented by Nis Zinovy (zinovy.y.nis@intel.com)
Fixed truncate i32 to i1; a test will be provided in the next commit.

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

10 years agoObject/COFF: Fix padding between CSDVersion and EditList.
Rui Ueyama [Thu, 20 Feb 2014 06:02:09 +0000 (06:02 +0000)]
Object/COFF: Fix padding between CSDVersion and EditList.

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

10 years agoSimplify the implementation of getUnderlyingObjectsForInstr, without intending to...
Nick Lewycky [Thu, 20 Feb 2014 05:06:26 +0000 (05:06 +0000)]
Simplify the implementation of getUnderlyingObjectsForInstr, without intending to change the semantics at all.

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

10 years agoAdd support for hashing attributes with DW_FORM_block. This required
Eric Christopher [Thu, 20 Feb 2014 02:50:45 +0000 (02:50 +0000)]
Add support for hashing attributes with DW_FORM_block. This required
passing down an AsmPrinter instance so we could compute the size of
the block which could be target specific. All of the test cases in
the unittest don't have any target specific data so we can use a NULL
AsmPrinter there. This also depends upon block data being added as
integers.

We can now hash the entire fission-cu.ll compile unit so turn the
flag on there with the hash value.

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

10 years agoMake DIELoc/DIEBlock's ComputeSize method const. Add a setSize
Eric Christopher [Thu, 20 Feb 2014 02:40:45 +0000 (02:40 +0000)]
Make DIELoc/DIEBlock's ComputeSize method const. Add a setSize
method to actually set it in the class to avoid computing it
multiple times.

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

10 years agoFormat.
Eric Christopher [Thu, 20 Feb 2014 02:40:41 +0000 (02:40 +0000)]
Format.

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

10 years agoThis tests DW_FORM_sdata, not DW_FORM_block. Make the test say so.
Eric Christopher [Thu, 20 Feb 2014 01:27:51 +0000 (01:27 +0000)]
This tests DW_FORM_sdata, not DW_FORM_block. Make the test say so.

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

10 years agoFix commit thinkos from splitting out patches.
Eric Christopher [Thu, 20 Feb 2014 00:59:17 +0000 (00:59 +0000)]
Fix commit thinkos from splitting out patches.

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

10 years agoAdd support for hashing DW_FORM_sdata and a small testcase.
Eric Christopher [Thu, 20 Feb 2014 00:54:40 +0000 (00:54 +0000)]
Add support for hashing DW_FORM_sdata and a small testcase.

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

10 years agoFormat.
Eric Christopher [Thu, 20 Feb 2014 00:54:38 +0000 (00:54 +0000)]
Format.

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

10 years agoRemove FIXME that had snuck in.
Eric Christopher [Thu, 20 Feb 2014 00:54:35 +0000 (00:54 +0000)]
Remove FIXME that had snuck in.

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

10 years agoAvoid collisions with Objective-C++ keywords
Tobias Grosser [Wed, 19 Feb 2014 22:16:53 +0000 (22:16 +0000)]
Avoid collisions with Objective-C++ keywords

Change parameter names exposed in headers to avoid collisions with Objective-C++
keywords.

Contributed-by: Graham Lee <graham@iamleeg.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201727 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix typo
Tobias Grosser [Wed, 19 Feb 2014 22:16:49 +0000 (22:16 +0000)]
Fix typo

Found by: Duncan P. N. Exon Smith <dexonsmith@apple.com>

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

10 years agoMake one statement easier to understand from post commmit feedback from a
Reed Kotler [Wed, 19 Feb 2014 22:11:45 +0000 (22:11 +0000)]
Make one statement easier to understand from post commmit feedback from a
review of the previous patch that introduced this week.

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

10 years agoExpand 64bit {SHL,SHR,SRA}_PARTS on sparcv9.
Roman Divacky [Wed, 19 Feb 2014 21:35:39 +0000 (21:35 +0000)]
Expand 64bit {SHL,SHR,SRA}_PARTS on sparcv9.

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

10 years agomove getNameWithPrefix and getSymbol to TargetMachine.
Rafael Espindola [Wed, 19 Feb 2014 20:30:41 +0000 (20:30 +0000)]
move getNameWithPrefix and getSymbol to TargetMachine.

TargetLoweringBase is implemented in CodeGen, so before this patch we had
a dependency fom Target to CodeGen. This would show up as a link failure of
llvm-stress when building with -DBUILD_SHARED_LIBS=ON.

This fixes pr18900.

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

10 years agoAdd back r201608, r201622, r201624 and r201625
Rafael Espindola [Wed, 19 Feb 2014 17:23:20 +0000 (17:23 +0000)]
Add back r201608, r201622, r201624 and r201625

r201608 made llvm corretly handle private globals with MachO. r201622 fixed
a bug in it and r201624 and r201625 were changes for using private linkage,
assuming that llvm would do the right thing.

They all got reverted because r201608 introduced a crash in LTO. This patch
includes a fix for that. The issue was that TargetLoweringObjectFile now has
to be initialized before we can mangle names of private globals. This is
trivially true during the normal codegen pipeline (the asm printer does it),
but LTO has to do it manually.

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

10 years agoRefactor TargetOptions initialization into a single place.
Eli Bendersky [Wed, 19 Feb 2014 17:09:35 +0000 (17:09 +0000)]
Refactor TargetOptions initialization into a single place.

The same code (~20 lines) for initializing a TargetOptions object from CodeGen
cmdline flags is duplicated 4 times in 4 different tools. This patch moves it
into a utility function.

Since the CodeGen/CommandFlags.h file defines cl::opt flags in a header, it's
a bit of a touchy situation because we should only link them into tools. So this
patch puts the init function in the header.

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

10 years agoTest commit - remove the new line to lib/Target/AArch64/AArch64TargetMachine.cpp.
Christian Pirker [Wed, 19 Feb 2014 16:58:28 +0000 (16:58 +0000)]
Test commit - remove the new line to lib/Target/AArch64/AArch64TargetMachine.cpp.

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

10 years ago[mips] Use multiple FileCheck prefixes rather than run the test multiple times
Daniel Sanders [Wed, 19 Feb 2014 16:27:36 +0000 (16:27 +0000)]
[mips] Use multiple FileCheck prefixes rather than run the test multiple times

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

10 years ago[mips] In the integrated assembler, select the default feature bits by changing the...
Daniel Sanders [Wed, 19 Feb 2014 16:13:26 +0000 (16:13 +0000)]
[mips] In the integrated assembler, select the default feature bits by changing the CPU value.

This is consistent with the way CodeGen acheives this. However, CodeGen
always selects mips32 (even when the architecture is mips64).

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

10 years agoTest commit - added a new line to lib/Target/AArch64/AArch64TargetMachine.cpp.
Christian Pirker [Wed, 19 Feb 2014 16:07:32 +0000 (16:07 +0000)]
Test commit - added a new line to lib/Target/AArch64/AArch64TargetMachine.cpp.

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

10 years ago[Sparc] Remove spurious checks from a testcase.
Venkatraman Govindaraju [Wed, 19 Feb 2014 15:57:49 +0000 (15:57 +0000)]
[Sparc] Remove spurious checks from a testcase.

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

10 years ago[mips] Use llvm::Triple in ParseMipsTriple() instead of manually parsing it
Daniel Sanders [Wed, 19 Feb 2014 15:55:21 +0000 (15:55 +0000)]
[mips] Use llvm::Triple in ParseMipsTriple() instead of manually parsing it

No functional change.

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

10 years agoThis reverts commit r201625 and r201624.
Rafael Espindola [Wed, 19 Feb 2014 15:49:46 +0000 (15:49 +0000)]
This reverts commit r201625 and r201624.

Since r201608 got reverted, it is not safe to use private linkage in these cases
until it is committed back.

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

10 years ago[mips] Add explicit N32 and N64 tests to nabi-regs.s test
Daniel Sanders [Wed, 19 Feb 2014 15:30:54 +0000 (15:30 +0000)]
[mips] Add explicit N32 and N64 tests to nabi-regs.s test

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

10 years agoSupport GTest for FreeBSD platforms (9.x)
Alexey Samsonov [Wed, 19 Feb 2014 15:18:30 +0000 (15:18 +0000)]
Support GTest for FreeBSD platforms (9.x)

Patch by Viktor Kutuzov!

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

10 years ago[mips] Remove unused NotN64 predicate
Daniel Sanders [Wed, 19 Feb 2014 15:16:47 +0000 (15:16 +0000)]
[mips] Remove unused NotN64 predicate

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

10 years agoFix AVX512 vector sqrt assembly strings.
Cameron McInally [Wed, 19 Feb 2014 15:16:09 +0000 (15:16 +0000)]
Fix AVX512 vector sqrt assembly strings.

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

10 years agoDisable override and final C++ keyword in gcc 4.6.
Logan Chien [Wed, 19 Feb 2014 15:04:29 +0000 (15:04 +0000)]
Disable override and final C++ keyword in gcc 4.6.

According to http://gcc.gnu.org/projects/cxx0x.html,
override and final keyword was added in gcc 4.7.  Thus,
we should not use these keywords in gcc 4.6 even when
__GXX_EXPERIMENTAL_CXX0X__ is available.

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

10 years agoRevert r201622 and r201608.
Daniel Jasper [Wed, 19 Feb 2014 12:26:01 +0000 (12:26 +0000)]
Revert r201622 and r201608.

This causes the LLVMgold plugin to segfault. More information on the
replies to r201608.

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

10 years agoX86: move test requiring X86TargetLowering info into its own directory
Tim Northover [Wed, 19 Feb 2014 12:24:19 +0000 (12:24 +0000)]
X86: move test requiring X86TargetLowering info into its own directory

If LLVM is built without X86 as a supported target then the test would
mysteriously fail.

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

10 years agoTry addding datalayout in case that's what Hexagon doesn't like.
Tim Northover [Wed, 19 Feb 2014 10:32:40 +0000 (10:32 +0000)]
Try addding datalayout in case that's what Hexagon doesn't like.

Just a wild stab in the dark really, but in the absence of any ability to
reproduce the problem...

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

10 years agoX86 CodeGenPrep: sink shufflevectors before shifts
Tim Northover [Wed, 19 Feb 2014 10:02:43 +0000 (10:02 +0000)]
X86 CodeGenPrep: sink shufflevectors before shifts

On x86, shifting a vector by a scalar is significantly cheaper than shifting a
vector by another fully general vector. Unfortunately, because SelectionDAG
operates on just one basic block at a time, the shufflevector instruction that
reveals whether the right-hand side of a shift *is* really a scalar is often
not visible to CodeGen when it's needed.

This adds another handler to CodeGenPrepare, to sink any useful shufflevector
instructions down to the basic block where they're used, predicated on a target
hook (since on other architectures, doing so will often just introduce extra
real work).

rdar://problem/16063505

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

10 years agoBuild PIE binaries when cross-compiling to Android.
Evgeniy Stepanov [Wed, 19 Feb 2014 09:51:22 +0000 (09:51 +0000)]
Build PIE binaries when cross-compiling to Android.

This change also removes CMAKE_LINK_FLAGS setting that seems to be ignored by cmake.

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

10 years agoTry to revive buildbots after r201620
Alexey Samsonov [Wed, 19 Feb 2014 08:30:55 +0000 (08:30 +0000)]
Try to revive buildbots after r201620

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

10 years agoRemove special FP opcode maps and instead add enough MRM_XX formats to handle all...
Craig Topper [Wed, 19 Feb 2014 08:25:02 +0000 (08:25 +0000)]
Remove special FP opcode maps and instead add enough MRM_XX formats to handle all the FP operations. This increases format by 1 bit, but decreases opcode map by 1 bit so the TSFlags size doesn't change.

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

10 years agoReduce size of map field in X86 TSFlags since it now requires less bits.
Craig Topper [Wed, 19 Feb 2014 07:29:07 +0000 (07:29 +0000)]
Reduce size of map field in X86 TSFlags since it now requires less bits.

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

10 years agoPut some of the X86 formats in a more logical order.
Craig Topper [Wed, 19 Feb 2014 06:59:13 +0000 (06:59 +0000)]
Put some of the X86 formats in a more logical order.

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

10 years agoRemove A6/A7 opcode maps. They can all be handled with a TB map, opcode of 0xa6/0xa7...
Craig Topper [Wed, 19 Feb 2014 05:34:21 +0000 (05:34 +0000)]
Remove A6/A7 opcode maps. They can all be handled with a TB map, opcode of 0xa6/0xa7, and adding MRM_C0/MRM_E0 forms. Removes 376K from the disassembler tables.

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

10 years agollvm-objdump/COFF: Print load configuration table.
Rui Ueyama [Wed, 19 Feb 2014 03:53:11 +0000 (03:53 +0000)]
llvm-objdump/COFF: Print load configuration table.

Load Configuration Table may contain a pointer to SEH table. This patch is to
print the offset to the table. Printing SEH table contents is a TODO.

The layout of Layout Configuration Table is described in Microsoft PE/COFF
Object File Format Spec, but the table's offset/size descriptions seems to be
totally wrong, at least in revision 8.3 of the spec. I believe the table in
this patch is the correct one.

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

10 years agoFix a typo in a comment.
Mingjie Xing [Wed, 19 Feb 2014 03:20:46 +0000 (03:20 +0000)]
Fix a typo in a comment.

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

10 years agoMCAsmParser: support required parameters
Saleem Abdulrasool [Wed, 19 Feb 2014 03:00:29 +0000 (03:00 +0000)]
MCAsmParser: support required parameters

This enhances the macro parser to parse and handle parameter qualifications,
which is needed to support required formal parameters in macro definitions.  A
required parameter may not be defaulted (though providing a default value is
accepted with a warning).  This improves GAS compatibility.

Partially addresses PR9248.

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

10 years agoMCAsmParser: change representation of MCAsmMacroParameter
Saleem Abdulrasool [Wed, 19 Feb 2014 03:00:23 +0000 (03:00 +0000)]
MCAsmParser: change representation of MCAsmMacroParameter

Rather than using std::pair, create a structure to represent the type.  This is
a preliminary refactoring to enable required parameter handling.  Additional
state is needed to indicate required parameters.  This has a minor side effect
of improving readability by providing more accurate names compared to first and
second.

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

10 years agoNow that llvm always does the right thing with private, use it.
Rafael Espindola [Wed, 19 Feb 2014 02:08:39 +0000 (02:08 +0000)]
Now that llvm always does the right thing with private, use it.

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

10 years agoUse PrivateLinkage now that it is safe.
Rafael Espindola [Wed, 19 Feb 2014 01:46:57 +0000 (01:46 +0000)]
Use PrivateLinkage now that it is safe.

Now that llvm's codegen knows to use an 'l' prefix when needed, we can just
use PrivateLinkage.

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

10 years agoAvoid an infinite cycle with private linkage and -f{data|function}-sections.
Rafael Espindola [Wed, 19 Feb 2014 01:28:30 +0000 (01:28 +0000)]
Avoid an infinite cycle with private linkage and -f{data|function}-sections.

When outputting an object we check its section to find its name, but when
looking for the section with -ffunction-section we look for the symbol name.

Break the loop by requesting a name with the private prefix when constructing
the section name. This matches the behavior before r201608.

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

10 years ago[docs] Clean up some more llvm-gcc stuff
Sean Silva [Wed, 19 Feb 2014 00:12:34 +0000 (00:12 +0000)]
[docs] Clean up some more llvm-gcc stuff

Some references to llvm-gcc were so crusty that I wasn't sure how to
proceed and so I've left them intact.

I also slipped in a quick peephole fix to use a :doc: link instead of
raw HTML link.

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

10 years ago[docs] Nuke some references to llvm-gcc
Sean Silva [Tue, 18 Feb 2014 23:56:43 +0000 (23:56 +0000)]
[docs] Nuke some references to llvm-gcc

From a cursory look it seems like all the described commandline options
and such apply to clang just fine, but I'd appreciate a second opinion.

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

10 years agoFix PR18743.
Rafael Espindola [Tue, 18 Feb 2014 22:24:57 +0000 (22:24 +0000)]
Fix PR18743.

The IR
@foo = private constant i32 42

is valid, but before this patch we would produce an invalid MachO from it. It
was invalid because it would use an L label in a section where the liker needs
the labels in order to atomize it.

One way of fixing it would be to just reject this IR in the backend, but that
would not be very front end friendly.

What this patch does is use an 'l' prefix in sections that we know the linker
requires symbols for atomizing them. This allows frontends to just use
private and not worry about which sections they go to or how the linker handles
them.

One small issue with this strategy is that now a symbol name depends on the
section, which is not available before codegen. This is not a problem in
practice. The reason is that it only happens with private linkage, which will
be ignored by the non codegen users (llvm-nm and llvm-ar).

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

10 years agoRename a DebugLoc variable to DbgLoc and a DataLayout to DL.
Rafael Espindola [Tue, 18 Feb 2014 22:05:46 +0000 (22:05 +0000)]
Rename a DebugLoc variable to DbgLoc and a DataLayout to DL.

This is quiet a bit less confusing now that TargetData was renamed DataLayout.

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

10 years agoConsistently check 'IsCode' when allocating sections in RuntimeDyld (via
Lang Hames [Tue, 18 Feb 2014 21:46:39 +0000 (21:46 +0000)]
Consistently check 'IsCode' when allocating sections in RuntimeDyld (via
findOrEmitSection).

Vaidas Gasiunas's patch, r201259, fixed one instance where we were always
allocating sections as text. This patch fixes the remaining buggy call sites.

No test case: This isn't breaking anything that I know of, it's just
inconsistent.

<rdar://problem/15943542>

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

10 years ago[AArch64] Expanded sin, cos, pow with FP vector types inputs
Ana Pazos [Tue, 18 Feb 2014 20:31:05 +0000 (20:31 +0000)]
[AArch64] Expanded sin, cos, pow with FP vector types inputs

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

10 years ago[mips] Add support for ELF64-mips and the R_MIPS_32/R_MIPS_64 relocs for it.
Daniel Sanders [Tue, 18 Feb 2014 15:57:52 +0000 (15:57 +0000)]
[mips] Add support for ELF64-mips and the R_MIPS_32/R_MIPS_64 relocs for it.

Summary:
This fixes several test failures when building LLVM on a MIPS host.

The failures were:
    LLVM :: DebugInfo/enum.ll
    LLVM :: DebugInfo/inlined-arguments.ll
    LLVM :: DebugInfo/member-order.ll
    LLVM :: DebugInfo/namespace.ll
    LLVM :: DebugInfo/template-recursive-void.ll
    LLVM :: DebugInfo/tu-composite.ll
    LLVM :: DebugInfo/two-cus-from-same-file.ll
    LLVM :: Linker/type-unique-simple-a.ll
    LLVM :: Linker/type-unique-simple2.ll

Reviewers: jacksprat, matheusalmeida

Reviewed By: matheusalmeida

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

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

10 years agoRename some member variables from TD to DL.
Rafael Espindola [Tue, 18 Feb 2014 15:33:12 +0000 (15:33 +0000)]
Rename some member variables from TD to DL.

TargetData was renamed DataLayout back in r165242.

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

10 years agoAdd myself as owner for libc++
Marshall Clow [Tue, 18 Feb 2014 14:03:17 +0000 (14:03 +0000)]
Add myself as owner for libc++

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

10 years agoXCore target: Handle common linkage
Robert Lytton [Tue, 18 Feb 2014 11:21:59 +0000 (11:21 +0000)]
XCore target: Handle common linkage

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

10 years agoXCore target: addMemOperand as necessary
Robert Lytton [Tue, 18 Feb 2014 11:21:53 +0000 (11:21 +0000)]
XCore target: addMemOperand as necessary

BuildMI instructions were not including MachineMemOperand information.
This was discovered by 'SingleSource/Benchmarks/Stanford/Oscar' failing
due to a FrameIndex load incorrectly being hoisted by postra-machine-licm.
No other tests have been found to fail.

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

10 years agoXCore target: Fix llvm.eh.return and EH info register handling
Robert Lytton [Tue, 18 Feb 2014 11:21:48 +0000 (11:21 +0000)]
XCore target: Fix llvm.eh.return and EH info register handling

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

10 years agoDarwin builds: handle different possible form for SDKROOT.
Tim Northover [Tue, 18 Feb 2014 11:20:44 +0000 (11:20 +0000)]
Darwin builds: handle different possible form for SDKROOT.

Modifying build_llvm to handle SDKROOT being the name of an SDK rather than a
path. This will still work if SDKROOT is a path.

rdar://problem/15162322

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

10 years agoGlobalMerge: move "-global-merge" option to the pass itself.
Tim Northover [Tue, 18 Feb 2014 11:17:29 +0000 (11:17 +0000)]
GlobalMerge: move "-global-merge" option to the pass itself.

It's rather odd to have the flag enabling and disabling this pass only affect a
single target.

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

10 years agoX86: use vpsllvd (& friends) for 16-bit shifts on Haswell
Tim Northover [Tue, 18 Feb 2014 11:15:32 +0000 (11:15 +0000)]
X86: use vpsllvd (& friends) for 16-bit shifts on Haswell

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

10 years agollvm-cov: Support gcov's extermely lenient treatment of -o
Justin Bogner [Tue, 18 Feb 2014 09:19:48 +0000 (09:19 +0000)]
llvm-cov: Support gcov's extermely lenient treatment of -o

In gcov, the -o flag can accept either a directory or a file name.
When given a directory, the gcda and gcno files are expected to be in
that directory. When given a file, the gcda and gcno files are
expected to be named based on the stem of that file. Non-existent
paths are treated as files.

This implements compatible behaviour.

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

10 years agoAdd PS prefix to some classes I missed in r201538.
Craig Topper [Tue, 18 Feb 2014 08:24:22 +0000 (08:24 +0000)]
Add PS prefix to some classes I missed in r201538.

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

10 years agoAdd a bunch of OpSize32 tags to 64-bit mode only instructions to match their 32-bit...
Craig Topper [Tue, 18 Feb 2014 08:18:29 +0000 (08:18 +0000)]
Add a bunch of OpSize32 tags to 64-bit mode only instructions to match their 32-bit mode counterparts for cases where there is also a OpSize16 instruction.

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

10 years agoAVX-512: Fixed size of mask registers
Elena Demikhovsky [Tue, 18 Feb 2014 07:52:26 +0000 (07:52 +0000)]
AVX-512: Fixed size of mask registers

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

10 years agoFix a typo about lowering AArch64 va_copy.
Jiangning Liu [Tue, 18 Feb 2014 02:37:42 +0000 (02:37 +0000)]
Fix a typo about lowering AArch64 va_copy.

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

10 years agoAdd an x86 prefix encoding for instructions that would decode to a different instruct...
Craig Topper [Tue, 18 Feb 2014 00:21:49 +0000 (00:21 +0000)]
Add an x86 prefix encoding for instructions that would decode to a different instruction with 0xf2/f3/66 were in front of them, but don't themselves have a prefix. For now this doesn't change any bbehavior, but plan to use it to fix some bugs in the disassembler.

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

10 years agoPGO: llvm-profdata: tool for merging profiles
Duncan P. N. Exon Smith [Mon, 17 Feb 2014 23:22:49 +0000 (23:22 +0000)]
PGO: llvm-profdata: tool for merging profiles

Introducing llvm-profdata, a tool for merging profile data generated by
PGO instrumentation in clang.

- The name indicates a file extension of <name>.profdata.  Eventually
  profile data output by clang should be changed to that extension.

- llvm-profdata merges two profiles.  However, the name is more general,
  since it will likely pick up more tasks (such as summarizing a single
  profile).

- llvm-profdata parses the current text-based format, but will be
  updated once we settle on a binary format.

<rdar://problem/15949645>

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

10 years agoFix the arm assembler so that this malformed instruction:
Kevin Enderby [Mon, 17 Feb 2014 21:45:27 +0000 (21:45 +0000)]
Fix the arm assembler so that this malformed instruction:
    ldrd r6, r7 [r2, #15]
simply gives an error and does not triggers an assertion.

As Jim points out, the diagnostic is really strange here,
but fixing that would be more complicated. The missing
comma results in the parser expecting a construct like r2[2],
which is the vector index thing the error message is talking
about. That's not what the user intended, though, and there's
nothing else in the instruction that looks at all like a vector.
Yet more fallout from not having a real parser here and trying
to do context-free generic matching for addressing modes.

rdar://15097243

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

10 years agoAdd support for assigning to . in AsmParser.
Anders Waldenborg [Mon, 17 Feb 2014 20:48:32 +0000 (20:48 +0000)]
Add support for assigning to . in AsmParser.

This is implemented by handling assignments to the '.' pseudo symbol
as ".org" directives.

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

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

10 years agoFix diassembler handling of rex.b when mod=00/01/10 and bbb=101. Mod=00 should ignore...
Craig Topper [Mon, 17 Feb 2014 10:03:43 +0000 (10:03 +0000)]
Fix diassembler handling of rex.b when mod=00/01/10 and bbb=101. Mod=00 should ignore the base register entirely. Mod=01/10 should treat this as R13 plus displacment. Fixes PR18860.

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

10 years agoAVX-512: implemented zext fron i1 to i16
Elena Demikhovsky [Mon, 17 Feb 2014 07:29:33 +0000 (07:29 +0000)]
AVX-512: implemented zext fron i1 to i16

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

10 years agofix for null VectorizedValue assertion in the SLP Vectorizer (in function vectorizeTr...
Gerolf Hoflehner [Mon, 17 Feb 2014 03:06:16 +0000 (03:06 +0000)]
fix for null VectorizedValue assertion in the SLP Vectorizer (in function vectorizeTree()). radar://16064178

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

10 years agoMCAsmParser: add some mixed argument tests
Saleem Abdulrasool [Mon, 17 Feb 2014 00:40:22 +0000 (00:40 +0000)]
MCAsmParser: add some mixed argument tests

Add some tests to explicitly validate handling of comma and non-comma separated
arguments.

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