oota-llvm.git
11 years agoARM: Constrain regclass for TSTri instruction.
Jim Grosbach [Mon, 26 Aug 2013 20:22:05 +0000 (20:22 +0000)]
ARM: Constrain regclass for TSTri instruction.

Get the register class right for the TST instruction. This keeps the
machine verifier happy, enabling us to turn it on for another test.

rdar://12594152

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

11 years agoDummy code to silence warning from 4189266
Bill Schmidt [Mon, 26 Aug 2013 20:11:46 +0000 (20:11 +0000)]
Dummy code to silence warning from 4189266

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

11 years agoARM: FastISel verifier error cleanup.
Jim Grosbach [Mon, 26 Aug 2013 20:07:29 +0000 (20:07 +0000)]
ARM: FastISel verifier error cleanup.

Constant pool and global value reference instructions need more
restricted register classes than plain GPR.

rdar://12594152

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

11 years agoARM: Fix ELF global base reg intialization.
Jim Grosbach [Mon, 26 Aug 2013 20:07:25 +0000 (20:07 +0000)]
ARM: Fix ELF global base reg intialization.

The create machine code wasn't properly in SSA, which the machine verifier
properly complains about. Now that fast-isel is closer to verifier clean,
errors like this show up more clearly.

Additionally, the Thumb pseudo tPICADD was used for both ARM and Thumb
mode functions, which is obviously wrong. Fix that along the way.

Test case is part of the following commit which will finish making an
additional fast-isel test verifier clean an enable it for the
regression test suite. This commit is separate since its not just
a verifier cleanup, but an actual correctness issue.

rdar://12594152 (for the fast-isel verifier aspects)

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

11 years ago[PowerPC] More fast-isel chunks (returns and integer extends)
Bill Schmidt [Mon, 26 Aug 2013 19:42:51 +0000 (19:42 +0000)]
[PowerPC] More fast-isel chunks (returns and integer extends)

Incremental improvement to fast-isel for PPC64.  This allows us to
select on ret, sext, and zext.  Filling in sext/zext improves some of
the existing logic in handling compare-immediates that needed extends.

A simplified return convention for fast-isel is also added to the
PPC64 calling conventions.  All call/return processing for DAG
selection is handled with custom code, so there isn't an existing CC
to rely on here.  The include of PPCGenCallingConv.inc causes compiler
warnings due to the 32-bit calling conventions that are not used, so
the dummy function "usePPC32CCs()" is added here to silence those.

Test cases for the return and extend logic are added.

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

11 years agotest commit. Remove blank line
Yi Jiang [Mon, 26 Aug 2013 18:57:55 +0000 (18:57 +0000)]
test commit. Remove blank line

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

11 years agoFix unused variable in release build
Matt Arsenault [Mon, 26 Aug 2013 18:38:29 +0000 (18:38 +0000)]
Fix unused variable in release build

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

11 years agollvm-symbolizer: use real path when looking for debug binary location
Alexey Samsonov [Mon, 26 Aug 2013 18:12:03 +0000 (18:12 +0000)]
llvm-symbolizer: use real path when looking for debug binary location

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

11 years ago[cmake] Check for realpath availability in CMake
Alexey Samsonov [Mon, 26 Aug 2013 18:11:25 +0000 (18:11 +0000)]
[cmake] Check for realpath availability in CMake

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

11 years agoForgot to add slp threshold to test
Matt Arsenault [Mon, 26 Aug 2013 18:08:35 +0000 (18:08 +0000)]
Forgot to add slp threshold to test

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

11 years agoConstify functions
Matt Arsenault [Mon, 26 Aug 2013 17:56:38 +0000 (17:56 +0000)]
Constify functions

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

11 years agoVectorize starting from insertelements building a vector
Matt Arsenault [Mon, 26 Aug 2013 17:56:35 +0000 (17:56 +0000)]
Vectorize starting from insertelements building a vector

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

11 years agoCMake: move lto.h install to tools/lto/CMakeLists.txt
Hans Wennborg [Mon, 26 Aug 2013 16:54:12 +0000 (16:54 +0000)]
CMake: move lto.h install to tools/lto/CMakeLists.txt

It looked misplaced in the main CMakeLists.txt file.

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

11 years agoSelectionDAG: Remove unnecessary uses of TargetLowering::getPointerTy()
Tom Stellard [Mon, 26 Aug 2013 15:06:10 +0000 (15:06 +0000)]
SelectionDAG: Remove unnecessary uses of TargetLowering::getPointerTy()

If we have a binary operation like ISD:ADD, we can set the result type
equal to the result type of one of its operands rather than using
TargetLowering::getPointerTy().

Also, any use of DAG.getIntPtrConstant(C) as an operand for a binary
operation can be replaced with:
DAG.getConstant(C, OtherOperand.getValueType());

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

11 years agoR600: Add support for vector local memory loads
Tom Stellard [Mon, 26 Aug 2013 15:06:04 +0000 (15:06 +0000)]
R600: Add support for vector local memory loads

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

11 years agoR600: Add support for i8 and i16 local memory loads
Tom Stellard [Mon, 26 Aug 2013 15:05:59 +0000 (15:05 +0000)]
R600: Add support for i8 and i16 local memory loads

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

11 years agoSelectionDAG: Use correct pointer size when splitting vector stores
Tom Stellard [Mon, 26 Aug 2013 15:05:55 +0000 (15:05 +0000)]
SelectionDAG: Use correct pointer size when splitting vector stores

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

11 years agoR600: Add support for i8 and i16 local memory stores
Tom Stellard [Mon, 26 Aug 2013 15:05:49 +0000 (15:05 +0000)]
R600: Add support for i8 and i16 local memory stores

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

11 years agoR600: Add support for v4i32 and v2i32 local stores
Tom Stellard [Mon, 26 Aug 2013 15:05:44 +0000 (15:05 +0000)]
R600: Add support for v4i32 and v2i32 local stores

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

11 years agoSelectionDAG: Use correct pointer size when lowering function arguments v2
Tom Stellard [Mon, 26 Aug 2013 15:05:36 +0000 (15:05 +0000)]
SelectionDAG: Use correct pointer size when lowering function arguments v2

This adds minimal support to the SelectionDAG for handling address spaces
with different pointer sizes.  The SelectionDAG should now correctly
lower pointer function arguments to the correct size as well as generate
the correct code when lowering getelementptr.

This patch also updates the R600 DataLayout to use 32-bit pointers for
the local address space.

v2:
  - Add more helper functions to TargetLoweringBase
  - Use CHECK-LABEL for tests

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

11 years agoCMake Xcode builds: symlink tblgen targets out to bin/.
Douglas Gregor [Mon, 26 Aug 2013 14:43:19 +0000 (14:43 +0000)]
CMake Xcode builds: symlink tblgen targets out to bin/.

Xcode always puts executable targets in the directory
bin/<Config>. When building separate LLVM and Clang projects for
Xcode, this prevents the CMake-configured project for Clang from
finding llvm-tblgen. Add a symlink so that tblgen executables are
always available in bin/ (regardless of the configuration LLVM is
built with).

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

11 years agoAVX-512: Added shuffle instructions -
Elena Demikhovsky [Mon, 26 Aug 2013 12:45:35 +0000 (12:45 +0000)]
AVX-512: Added shuffle instructions -
 VPSHUFD, VPERMILPS, VMOVDDUP, VMOVLHPS, VMOVHLPS, VSHUFPS, VALIGN
 single and double forms.

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

11 years agoThis patch implements trap instructions for mips. The test cases are added.
Vladimir Medic [Mon, 26 Aug 2013 10:02:40 +0000 (10:02 +0000)]
This patch implements trap instructions for mips. The test cases are added.

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

11 years agoInclude a clearer policy about what's ok/nok to speed up code reviews.
Manuel Klimek [Mon, 26 Aug 2013 07:29:08 +0000 (07:29 +0000)]
Include a clearer policy about what's ok/nok to speed up code reviews.

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

11 years agoMake sure x86 instructions using ssmem/sdmem operand types are only able to parse...
Craig Topper [Mon, 26 Aug 2013 00:39:04 +0000 (00:39 +0000)]
Make sure x86 instructions using ssmem/sdmem operand types are only able to parse memory operands of the proper size in Intel syntax. Primarily affects some of sse cvt instructions.

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

11 years agoRemove some unnecessary PredicateMethod overrides. Add RenderMethod overrides to...
Craig Topper [Mon, 26 Aug 2013 00:13:09 +0000 (00:13 +0000)]
Remove some unnecessary PredicateMethod overrides. Add RenderMethod overrides to remove forwarding in the X86AsmParser code itself. No functional change.

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

11 years agoPut some of the AVX-512 parsing stuff in a more consistent place with the existing...
Craig Topper [Sun, 25 Aug 2013 23:18:05 +0000 (23:18 +0000)]
Put some of the AVX-512 parsing stuff in a more consistent place with the existing functions.

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

11 years ago[PowerPC] Add fast-isel branch and compare selection.
Bill Schmidt [Sun, 25 Aug 2013 22:33:42 +0000 (22:33 +0000)]
[PowerPC] Add fast-isel branch and compare selection.

First chunk of actual fast-isel selection code.  This handles direct
and indirect branches, as well as feeding compares for direct
branches.  PPCFastISel::PPCEmitIntExt() is just roughed in and will be
expanded in a future patch.  This also corrects a problem with
selection for constant pool entries in JIT mode or with small code
model.

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

11 years agoFirst round of fixes for the x86 fixes for the x86 move accumulator from/to memory...
Craig Topper [Sun, 25 Aug 2013 22:23:38 +0000 (22:23 +0000)]
First round of fixes for the x86 fixes for the x86 move accumulator from/to memory offset instructions.

-Assembly parser now properly check the size of the memory operation specified in intel syntax. So 'mov word ptr [5], al' is no longer accepted.
-x86-32 disassembly of these instructions no longer sign extends the 32-bit address immediate based on size.
-Intel syntax printing prints the ptr size and places brackets around the address immediate.

Known remaining issues with these instructions:
-Segment override prefix is not supported. PR16962 and PR16961.
-Immediate size should be changed by address size prefix.

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

11 years agoFix #include guard.
Jakub Staszak [Sun, 25 Aug 2013 19:48:46 +0000 (19:48 +0000)]
Fix #include guard.

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

11 years ago[Sparc] Add long double (f128) instructions to sparc backend.
Venkatraman Govindaraju [Sun, 25 Aug 2013 18:30:06 +0000 (18:30 +0000)]
[Sparc] Add long double (f128) instructions to sparc backend.

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

11 years ago[Sparc] Added V9's extra floating point registers and their aliases.
Venkatraman Govindaraju [Sun, 25 Aug 2013 17:03:02 +0000 (17:03 +0000)]
[Sparc] Added V9's extra floating point registers and their aliases.

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

11 years agoAVX-512: added UNPACK instructions and tests for all-zero/all-ones vectors
Elena Demikhovsky [Sun, 25 Aug 2013 12:54:30 +0000 (12:54 +0000)]
AVX-512: added UNPACK instructions and tests for all-zero/all-ones vectors

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

11 years agoFix a bug where we would corrupt the offset when evaluating
Chandler Carruth [Sun, 25 Aug 2013 10:46:39 +0000 (10:46 +0000)]
Fix a bug where we would corrupt the offset when evaluating
a non-constant GEP.

I don't have any test case that demonstrates this, Nadav (indirectly)
pointed this out in code review. I'm not sure how possible it is to
contrive a test case for the current users of this code that triggers
the bad issue sadly.

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

11 years agoAsmPrinter: Get rid of llvm$workaround$fake$stub$
David Majnemer [Sun, 25 Aug 2013 09:18:19 +0000 (09:18 +0000)]
AsmPrinter: Get rid of llvm$workaround$fake$stub$

We currently emit labels with the prefix Lllvm$workaround$fake$stub$ if
the target's MCAsmInfo has getLinkOnceDirective() mapped to something
interesting.  This was apparently a work around introduced in r31033 for
binutils that we don't need anymore.

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

11 years agoStart to add the LLVM builtins to the mips16 exclusion lists for fp.
Reed Kotler [Sun, 25 Aug 2013 02:40:25 +0000 (02:40 +0000)]
Start to add the LLVM builtins to the mips16 exclusion lists for fp.
I need to add the rest of these to the list or else to delay putting
out the actual stub until later in code generation when I know if
the external function ever got emitted

Resubmit this patch. The target triple needs to be added to the test so that
clang does not tell the backend the wrong target when the host is BSD. There
is a clang bug in here somewhere that I need to track down. At Mips this
has been filed internally as a bug.

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

11 years ago[Support] fix compile with -Werror
Saleem Abdulrasool [Sat, 24 Aug 2013 20:35:16 +0000 (20:35 +0000)]
[Support] fix compile with -Werror

error: commas at the end of enumerator lists are a C++11 extension
[-Werror,-Wc++11-extensions]

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

11 years agoAdd hasSideEffects/mayLoad/mayStore flags to the X86 moffs8/moffs16/moffs32/moffs64...
Craig Topper [Sat, 24 Aug 2013 20:31:14 +0000 (20:31 +0000)]
Add hasSideEffects/mayLoad/mayStore flags to the X86 moffs8/moffs16/moffs32/moffs64 versions of move.

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

11 years ago[Support] add missing enumeration values
Saleem Abdulrasool [Sat, 24 Aug 2013 20:14:40 +0000 (20:14 +0000)]
[Support] add missing enumeration values

This adds additional missing Windows subsystem identifiers to the
IMAGE_SUBSYSTEM enumeration.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189180 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCheck if in set on insertion instead of separately
Matt Arsenault [Sat, 24 Aug 2013 19:55:38 +0000 (19:55 +0000)]
Check if in set on insertion instead of separately

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

11 years agoRemove trailing whitespace.
Craig Topper [Sat, 24 Aug 2013 19:50:11 +0000 (19:50 +0000)]
Remove trailing whitespace.

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

11 years agoRevert 189161
Shuxin Yang [Sat, 24 Aug 2013 17:53:16 +0000 (17:53 +0000)]
Revert 189161

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

11 years agoRemove trailing spaces.
Jakub Staszak [Sat, 24 Aug 2013 14:16:00 +0000 (14:16 +0000)]
Remove trailing spaces.

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

11 years agoAdd a function object to compare the first or second component of a std::pair.
Benjamin Kramer [Sat, 24 Aug 2013 12:54:27 +0000 (12:54 +0000)]
Add a function object to compare the first or second component of a std::pair.

Replace instances of this scattered around the code base.

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

11 years agoSimplify code. No functionality change.
Benjamin Kramer [Sat, 24 Aug 2013 12:15:54 +0000 (12:15 +0000)]
Simplify code. No functionality change.

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

11 years agoDwarfDebug: Delete orphaned children.
Benjamin Kramer [Sat, 24 Aug 2013 11:55:49 +0000 (11:55 +0000)]
DwarfDebug: Delete orphaned children.

Leak found by valgrind.

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

11 years ago[autotools->cmake] Enable generation of doxygen documentation via cmake.
Michael Gottesman [Sat, 24 Aug 2013 07:25:21 +0000 (07:25 +0000)]
[autotools->cmake] Enable generation of doxygen documentation via cmake.

I am going to add in a subsequent patch support for generating the llvm
manpage.

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

11 years agoAdded const qualifier to StringRef::edit_distance member function
Dmitri Gribenko [Sat, 24 Aug 2013 01:50:41 +0000 (01:50 +0000)]
Added const qualifier to StringRef::edit_distance member function

Patch by Ismail Pazarbasi.

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

11 years agoStart to add the builtind to the mips16 exclusion lists for fp.
Reed Kotler [Sat, 24 Aug 2013 01:24:44 +0000 (01:24 +0000)]
Start to add the builtind to the mips16 exclusion lists for fp.
I need to add the rest of these to the list or else to delay putting
out the actual stub until later in code generation when I know if
the external function ever got emitted.

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

11 years ago[NVPTX] Re-enable assembly printing support for inline assembly
Justin Holewinski [Sat, 24 Aug 2013 01:17:23 +0000 (01:17 +0000)]
[NVPTX] Re-enable assembly printing support for inline assembly

This support was removed by accident during the MC conversion

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

11 years agoDebugInfoFinder: handle imported entities of a CU.
Manman Ren [Sat, 24 Aug 2013 00:32:12 +0000 (00:32 +0000)]
DebugInfoFinder: handle imported entities of a CU.

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

11 years agoCMake: Add LLVM_INSTALL_TOOLCHAIN_ONLY option.
Hans Wennborg [Sat, 24 Aug 2013 00:20:36 +0000 (00:20 +0000)]
CMake: Add LLVM_INSTALL_TOOLCHAIN_ONLY option.

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

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

11 years agoUpdate test to use rdrnd instead of rdrand.
Rafael Espindola [Fri, 23 Aug 2013 20:49:02 +0000 (20:49 +0000)]
Update test to use rdrnd instead of rdrand.

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

11 years agoUpdate tests to use sse4.2 instead of sse42.
Rafael Espindola [Fri, 23 Aug 2013 20:46:35 +0000 (20:46 +0000)]
Update tests to use sse4.2 instead of sse42.

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

11 years agoReplace more uses of sse41 with sse4.1.
Rafael Espindola [Fri, 23 Aug 2013 20:39:19 +0000 (20:39 +0000)]
Replace more uses of sse41 with sse4.1.

llc using the host cpu features and *waning* on unknown features is probably
not a good thing :-(

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

11 years agoUpdate a test that I missed in the previous commit.
Rafael Espindola [Fri, 23 Aug 2013 20:27:02 +0000 (20:27 +0000)]
Update a test that I missed in the previous commit.

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

11 years agoRename features to match what gcc and clang use.
Rafael Espindola [Fri, 23 Aug 2013 20:21:34 +0000 (20:21 +0000)]
Rename features to match what gcc and clang use.

There is no advantage in being different and using the same names simplifies
clang a bit.

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

11 years agoDataFlowSanitizer: correctly combine labels in the case where they are equal.
Peter Collingbourne [Fri, 23 Aug 2013 18:45:06 +0000 (18:45 +0000)]
DataFlowSanitizer: correctly combine labels in the case where they are equal.

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

11 years agoDebugInfoFinder: handle template params of a DISubprogram.
Manman Ren [Fri, 23 Aug 2013 18:36:18 +0000 (18:36 +0000)]
DebugInfoFinder: handle template params of a DISubprogram.

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

11 years agoCMake: don't install tablegen
Hans Wennborg [Fri, 23 Aug 2013 18:28:10 +0000 (18:28 +0000)]
CMake: don't install tablegen

Since it's an llvm-internal tool, we shouldn't install it.

(This depends on Clang r189127 and lld r189128.)

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

11 years agoCMake: build llvm-config on Windows.
Hans Wennborg [Fri, 23 Aug 2013 17:59:13 +0000 (17:59 +0000)]
CMake: build llvm-config on Windows.

It was previously not being built on Windows because the cmake file relied
on a sed script to generate a .in file that llvm-config needs.

By using cmake's configure_file function, we can get rid off the sed hack,
and also have this work on Windows.

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

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

11 years agoPrintVRegOrUnit
Andrew Trick [Fri, 23 Aug 2013 17:48:53 +0000 (17:48 +0000)]
PrintVRegOrUnit

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

11 years agoRename to RegPressure API parameters RegUnits.
Andrew Trick [Fri, 23 Aug 2013 17:48:51 +0000 (17:48 +0000)]
Rename to RegPressure API parameters RegUnits.

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

11 years agoSimplify RegPressure helpers.
Andrew Trick [Fri, 23 Aug 2013 17:48:48 +0000 (17:48 +0000)]
Simplify RegPressure helpers.

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

11 years agoAdd a convenient PSetIterator for visiting pressure sets affected by a register.
Andrew Trick [Fri, 23 Aug 2013 17:48:46 +0000 (17:48 +0000)]
Add a convenient PSetIterator for visiting pressure sets affected by a register.

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

11 years agoAdds cyclic critical path computation and heuristics, temporarily disabled.
Andrew Trick [Fri, 23 Aug 2013 17:48:43 +0000 (17:48 +0000)]
Adds cyclic critical path computation and heuristics, temporarily disabled.

Estimate the cyclic critical path within a single block loop. If the
acyclic critical path is longer, then the loop will exhaust OOO
resources after some number of iterations. If lag between the acyclic
critical path and cyclic critical path is longer the the time it takes
to issue those loop iterations, then aggressively schedule for
latency.

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

11 years agoMI Sched: record local vreg uses.
Andrew Trick [Fri, 23 Aug 2013 17:48:39 +0000 (17:48 +0000)]
MI Sched: record local vreg uses.

This will be used to compute the cyclic critical path and to
update precomputed per-node pressure differences.
In the longer term, it could also be used to speed up LiveInterval
update by avoiding visiting all global vreg users.

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

11 years agoRemove unused field.
Andrew Trick [Fri, 23 Aug 2013 17:48:36 +0000 (17:48 +0000)]
Remove unused field.

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

11 years agomi-sched: Don't call MBB.size() in initSUnits. The driver already has instr count.
Andrew Trick [Fri, 23 Aug 2013 17:48:33 +0000 (17:48 +0000)]
mi-sched: Don't call MBB.size() in initSUnits. The driver already has instr count.

This fixes a pathological compile time problem with very large blocks
and lots of scheduling boundaries.

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

11 years agoChecking commit access; added one space
Jim Cownie [Fri, 23 Aug 2013 15:51:37 +0000 (15:51 +0000)]
Checking commit access; added one space

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

11 years ago[ARM] Fix another ARM FastISel -verify-machineinstrs issue.
Joey Gouly [Fri, 23 Aug 2013 15:20:56 +0000 (15:20 +0000)]
[ARM] Fix another ARM FastISel -verify-machineinstrs issue.

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

11 years ago[mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.
Daniel Sanders [Fri, 23 Aug 2013 12:21:25 +0000 (12:21 +0000)]
[mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.

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

11 years ago[msan] Fix handling of va_arg overflow area on x86_64.
Evgeniy Stepanov [Fri, 23 Aug 2013 12:11:00 +0000 (12:11 +0000)]
[msan] Fix handling of va_arg overflow area on x86_64.

The code was erroneously reading overflow area shadow from the TLS slot,
bypassing the local copy. Reading shadow directly from TLS is wrong, because
it can be overwritten by a nested vararg call, if that happens before va_start.

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

11 years ago[ARMv8] Add CodeGen for VMAXNM/VMINNM.
Joey Gouly [Fri, 23 Aug 2013 12:01:13 +0000 (12:01 +0000)]
[ARMv8] Add CodeGen for VMAXNM/VMINNM.

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

11 years agoAdd function attribute 'optnone'.
Andrea Di Biagio [Fri, 23 Aug 2013 11:53:55 +0000 (11:53 +0000)]
Add function attribute 'optnone'.

This function attribute indicates that the function is not optimized
by any optimization or code generator passes with the
exception of interprocedural optimization passes.

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

11 years ago[SystemZ] Add basic prefetch support
Richard Sandiford [Fri, 23 Aug 2013 11:36:42 +0000 (11:36 +0000)]
[SystemZ] Add basic prefetch support

Just the instructions and intrinsics for now.

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

11 years ago[SystemZ] Try reversing comparisons whose first operand is in memory
Richard Sandiford [Fri, 23 Aug 2013 11:27:19 +0000 (11:27 +0000)]
[SystemZ] Try reversing comparisons whose first operand is in memory

This allows us to make more use of the many compare reg,mem instructions.

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

11 years ago[SystemZ] Prefer LHI;ST... over LAY;MV...
Richard Sandiford [Fri, 23 Aug 2013 11:18:53 +0000 (11:18 +0000)]
[SystemZ] Prefer LHI;ST... over LAY;MV...

If we had a store of an integer to memory, and the integer and store size
were suitable for a form of MV..., we used MV... no matter what.  We could
then have sequences like:

    lay %r2, 0(%r3,%r4)
    mvi 0(%r2), 4

In these cases it seems better to force the constant into a register
and use a normal store:

    lhi %r2, 4
    stc %r2, 0(%r3, %r4)

since %r2 is more likely to be hoisted and is easier to rematerialize.

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

11 years agoTurn MipsOptimizeMathLibCalls into a target-independent scalar transform
Richard Sandiford [Fri, 23 Aug 2013 10:27:02 +0000 (10:27 +0000)]
Turn MipsOptimizeMathLibCalls into a target-independent scalar transform

...so that it can be used for z too.  Most of the code is the same.
The only real change is to use TargetTransformInfo to test when a sqrt
instruction is available.

The pass is opt-in because at the moment it only handles sqrt.

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

11 years agoARM: make sure ARM-mode pseudo-inst requires IsARM
Tim Northover [Fri, 23 Aug 2013 10:16:39 +0000 (10:16 +0000)]
ARM: make sure ARM-mode pseudo-inst requires IsARM

I'd forgotten that "Requires" blocks override rather than add to the
constraints, so my pseudo-instruction was being selected in Thumb mode leading
to nonsense instructions.

rdar://problem/14817358

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

11 years ago[mips][msa] Split MSA128 regset into size-specific sets containing the same registers.
Daniel Sanders [Fri, 23 Aug 2013 10:10:13 +0000 (10:10 +0000)]
[mips][msa] Split MSA128 regset into size-specific sets containing the same registers.

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

11 years ago80 cols
Alexey Samsonov [Fri, 23 Aug 2013 07:42:51 +0000 (07:42 +0000)]
80 cols

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

11 years agoMake DWARFCompileUnit non-copyable
Alexey Samsonov [Fri, 23 Aug 2013 06:56:01 +0000 (06:56 +0000)]
Make DWARFCompileUnit non-copyable

Summary:
This is a part of D1164. DWARFCompileUnit is not that lightweight
to copy it around, and we want it to own corresponding .dwo compile unit
eventually.

Reviewers: echristo

Reviewed By: echristo

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1298

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

11 years agolto/CMakeLists.txt: Cut the dep to intrinsics_gen. LTO doesn't depend on it and LTO_s...
NAKAMURA Takumi [Fri, 23 Aug 2013 02:51:13 +0000 (02:51 +0000)]
lto/CMakeLists.txt: Cut the dep to intrinsics_gen. LTO doesn't depend on it and LTO_static doesn't depend on anything.

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

11 years agoUse register masks on SPARC call instructions.
Jakob Stoklund Olesen [Fri, 23 Aug 2013 02:33:47 +0000 (02:33 +0000)]
Use register masks on SPARC call instructions.

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

11 years agoAdd an OtherPreserved field to the CalleeSaved TableGen class.
Jakob Stoklund Olesen [Fri, 23 Aug 2013 02:25:47 +0000 (02:25 +0000)]
Add an OtherPreserved field to the CalleeSaved TableGen class.

This field specifies registers that are preserved across function calls,
but that should not be included in the generates SaveList array.

This can be used ot generate regmasks for architectures that save
registers through other means, like SPARC's register windows.

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

11 years ago[PR11606] ocaml bindings tests produce binaries in source dir
Daniel Dunbar [Fri, 23 Aug 2013 00:55:32 +0000 (00:55 +0000)]
[PR11606] ocaml bindings tests produce binaries in source dir

 - Workaround for ocamlopt producing outputs adjacent to its source inputs, by
   having the tests copy the inputs into temporary directories in the output
   paths before building.

 - Patch by edward-san.

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

11 years agoFilecheckize some tests.
Michael Gottesman [Fri, 23 Aug 2013 00:23:28 +0000 (00:23 +0000)]
Filecheckize some tests.

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

11 years agoUpdate StripDeadDebugInfo to use DebugInfoFinder so that it is no longer stale to...
Michael Gottesman [Fri, 23 Aug 2013 00:23:24 +0000 (00:23 +0000)]
Update StripDeadDebugInfo to use DebugInfoFinder so that it is no longer stale to the point of not working and more resilient to debug info changes.

The current version of StripDeadDebugInfo became stale and no longer actually
worked since it was expecting an older version of debug info.

This patch updates it to use DebugInfoFinder and the modern DebugInfo classes as
much as possible to make it more redundent to such changes. Additionally, the
only place where that was avoided (the code where we replace the old sets with
the new), I call verify on the DIContextUnit implying that if the format changes
and my live set changes no longer make sense an assert will be hit. In order to
ensure that that occurs I have included a test case.

The actual stripping of the dead debug info follows the same strategy as was
used before in this class: find the live set and replace the old set in the
given compile unit (which may contain dead global variables/functions) with the
new live one.

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

11 years ago[stack protector] Work around an issue with the BMOVPCB_CALL instruction on ARM by...
Michael Gottesman [Thu, 22 Aug 2013 23:45:24 +0000 (23:45 +0000)]
[stack protector] Work around an issue with the BMOVPCB_CALL instruction on ARM by disabling does not return on __stack_chk_fail.

This is to fix the bots while I look to see if there is something I can do here.

rdar://14811848

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

11 years agoUpdate to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'.
Bill Wendling [Thu, 22 Aug 2013 21:28:54 +0000 (21:28 +0000)]
Update to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'.

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

11 years agoFix some tests. The 'false' version just omits the attribute altogether.
Bill Wendling [Thu, 22 Aug 2013 21:20:14 +0000 (21:20 +0000)]
Fix some tests. The 'false' version just omits the attribute altogether.

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

11 years agoCheck only if we have this attribute. If it's not an attribute, then it's assumed...
Bill Wendling [Thu, 22 Aug 2013 21:16:14 +0000 (21:16 +0000)]
Check only if we have this attribute. If it's not an attribute, then it's assumed false.

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

11 years agoFileCheckize some tests.
Bill Wendling [Thu, 22 Aug 2013 20:46:05 +0000 (20:46 +0000)]
FileCheckize some tests.

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

11 years agoR600/SI: Fix another case of illegal VGPR to SGPR copy
Tom Stellard [Thu, 22 Aug 2013 20:21:02 +0000 (20:21 +0000)]
R600/SI: Fix another case of illegal VGPR to SGPR copy

This fixes a crash in Unigine Tropics.

https://bugs.freedesktop.org/show_bug.cgi?id=68389

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

11 years agoDataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and...
Peter Collingbourne [Thu, 22 Aug 2013 20:08:15 +0000 (20:08 +0000)]
DataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and vice versa, with wrappers.

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

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

11 years agoDataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.
Peter Collingbourne [Thu, 22 Aug 2013 20:08:11 +0000 (20:08 +0000)]
DataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.

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

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

11 years agoDataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".
Peter Collingbourne [Thu, 22 Aug 2013 20:08:08 +0000 (20:08 +0000)]
DataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".

DFSan changes the ABI of each function in the module.  This makes it possible
for a function with the native ABI to be called with the instrumented ABI,
or vice versa, thus possibly invoking undefined behavior.  A simple way
of statically detecting instances of this problem is to prepend the prefix
"dfs$" to the name of each instrumented-ABI function.

This will not catch every such problem; in particular function pointers passed
across the instrumented-native barrier cannot be used on the other side.
These problems could potentially be caught dynamically.

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

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

11 years ago[Debug Info Tests] Update testing cases.
Manman Ren [Thu, 22 Aug 2013 17:11:18 +0000 (17:11 +0000)]
[Debug Info Tests] Update testing cases.

A single metadata will not span multiple lines. This also helps me with
my script to automatic update the testing cases.
A debug info testing case should have a llvm.dbg.cu.
Do not use hard-coded id for debug nodes.

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

11 years agoconfigure: Regenerate corresponding to r189026.
NAKAMURA Takumi [Thu, 22 Aug 2013 16:31:34 +0000 (16:31 +0000)]
configure: Regenerate corresponding to r189026.

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