oota-llvm.git
12 years agoExecutionEngine: refactor interface
Dylan Noblesmith [Mon, 12 Dec 2011 04:20:36 +0000 (04:20 +0000)]
ExecutionEngine: refactor interface

The OptLevel is now redundant with the TargetMachine*.
And selectTarget() isn't really JIT-specific and could probably
get refactored into one of the lower level libraries.

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

12 years agoRemove some remants of the old palign pattern fragment that were still hanging around...
Craig Topper [Sun, 11 Dec 2011 19:12:35 +0000 (19:12 +0000)]
Remove some remants of the old palign pattern fragment that were still hanging around. Also remove a cast from inside getShuffleVPERM2X128Immediate and getShuffleVPERMILPImmediate since the only caller already had done the cast.

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

12 years agoFixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT...
Stepan Dyatkovskiy [Sun, 11 Dec 2011 14:35:48 +0000 (14:35 +0000)]
Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Third attempt: simplified checks in test for armv7-apple-darwin11.

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

12 years agoMips: Don't create a dangling IR function just to get the address of a symbol.
Benjamin Kramer [Sun, 11 Dec 2011 12:21:34 +0000 (12:21 +0000)]
Mips: Don't create a dangling IR function just to get the address of a symbol.

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

12 years agollvm/CMakeLists.txt: Fix LLVM_LIT_TOOLS_DIR since r143728. Cygwin does not need optio...
NAKAMURA Takumi [Sun, 11 Dec 2011 03:07:53 +0000 (03:07 +0000)]
llvm/CMakeLists.txt: Fix LLVM_LIT_TOOLS_DIR since r143728. Cygwin does not need optional tools dir. MSVC and mingw may need one.

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

12 years agoAlso remove unnecessary includes from this file, which was supposed to be part
Nick Lewycky [Sun, 11 Dec 2011 00:45:13 +0000 (00:45 +0000)]
Also remove unnecessary includes from this file, which was supposed to be part
of r146334!

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

12 years agoMinimize #include's and forward-declares in Target.
Nick Lewycky [Sat, 10 Dec 2011 22:35:47 +0000 (22:35 +0000)]
Minimize #include's and forward-declares in Target.

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

12 years agoRefactor the implementation of the TargetOptions out of TargetMachine, taking
Nick Lewycky [Sat, 10 Dec 2011 22:34:41 +0000 (22:34 +0000)]
Refactor the implementation of the TargetOptions out of TargetMachine, taking
the only parts of TM that depends on CodeGen headers with it.

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

12 years agoDon't assume things about the exact details of the LLVM version number,
Chandler Carruth [Sat, 10 Dec 2011 21:40:31 +0000 (21:40 +0000)]
Don't assume things about the exact details of the LLVM version number,
such as what VCS information is attached.

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

12 years agoRevert associate SelectInsertValue test as well.
Chad Rosier [Sat, 10 Dec 2011 21:34:28 +0000 (21:34 +0000)]
Revert associate SelectInsertValue test as well.

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

12 years ago[fast-isel] SelectInsertValue seems to be causing miscompiles for ARM. Disable while...
Chad Rosier [Sat, 10 Dec 2011 21:27:40 +0000 (21:27 +0000)]
[fast-isel] SelectInsertValue seems to be causing miscompiles for ARM.  Disable while I investigate.

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

12 years agoRevert r146322 to appease buildbots. Original commit message:
Chad Rosier [Sat, 10 Dec 2011 19:55:03 +0000 (19:55 +0000)]
Revert r146322 to appease buildbots.  Original commit message:

Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for
FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Second
attempt.

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

12 years agoTypo.
Chad Rosier [Sat, 10 Dec 2011 19:48:51 +0000 (19:48 +0000)]
Typo.

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

12 years agoUse a simpler and more reliable command for converting from HEAD to
Chandler Carruth [Sat, 10 Dec 2011 10:18:47 +0000 (10:18 +0000)]
Use a simpler and more reliable command for converting from HEAD to
commit-ish. Funny thing, they have a command designed for this. ;]

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

12 years agoTeach the VCS detection to set some root-level variables with the raw
Chandler Carruth [Sat, 10 Dec 2011 10:04:38 +0000 (10:04 +0000)]
Teach the VCS detection to set some root-level variables with the raw
revision and git commit data extracted. This will be used in the Clang
CMake build to avoid trying to re-detect the information.

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

12 years agoAt the request of Michael Spencer, make the VCS version detection logic
Chandler Carruth [Sat, 10 Dec 2011 09:41:13 +0000 (09:41 +0000)]
At the request of Michael Spencer, make the VCS version detection logic
in CMake a bit more handy. Previously we would get such charming
versions as the following for revision NNNN and commit-ish XXXXX:
  3.1svnsvn-rNNNN
  3.1svngit-svn-rNNNN
  3.1svngit-svn-XXXXX

The mechanism selecting betwene the latter two was particularly odd, and
didn't work with all of the ways git-svn repos are set up apparently. It
also misses an important point -- both the revision *and* the git commit
might be relevant when working on a local branch some distance from
mainline. The new logic does several things:

1) It strips the redundant initial 'svn'.
2) It always looks for a git-svn revision number base, and when found
   includes it in the version.
3) If the git commit-ish for the current HEAD is not exactly that
   revision number, it is also included.

The resulting strings should roughly be:
  3.1svn-rNNNN
  3.1git-svn-rNNNN
  3.1git-svn-rNNNN-XXXXX

Suggestions on formatting etc always welcome. =] I've only looked at the
LLVM version string here, not Clang's (yet).

Note that the commit-ish reported is *not* terribly accurate. It updates
when 'cmake' is run, not when the binary is built. Still, it may be
better than nothing, especially if people have fairly long-lived git
repos and branches. This is not a new limitation, just didn't want
anyone to be surprised.

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

12 years agoFixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT...
Stepan Dyatkovskiy [Sat, 10 Dec 2011 08:42:24 +0000 (08:42 +0000)]
Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Second attempt.

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

12 years agoMake CR spill and restore use a reserved register. These operations cannot use the...
Hal Finkel [Sat, 10 Dec 2011 04:50:53 +0000 (04:50 +0000)]
Make CR spill and restore use a reserved register. These operations cannot use the register scavenger because the scavenger can only scavenge one register and frame-index elimination may have already grabbed it.

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

12 years agoFix typo, reported by Eitan Adler!
Nick Lewycky [Sat, 10 Dec 2011 03:16:20 +0000 (03:16 +0000)]
Fix typo, reported by Eitan Adler!

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

12 years agoTry to align the point where a large basic block is split.
Jakob Stoklund Olesen [Sat, 10 Dec 2011 02:55:10 +0000 (02:55 +0000)]
Try to align the point where a large basic block is split.

The split point is picked such that the newly created water has the same
alignment as the function. This makes the island suitable for constant
pool entries with potentially higher alignment.

This also fixes an issue where the basic block was split one instruction
too late, causing nonconvergence of the algorithm.

<rdar://problem/10550705>

There is still an issue with correctly packing differently aligned
entries in the island.

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

12 years agoMore debug output formatting.
Jakob Stoklund Olesen [Sat, 10 Dec 2011 02:55:06 +0000 (02:55 +0000)]
More debug output formatting.

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

12 years agoHandle expressions of the form _GLOBAL_OFFSET_TABLE_-symbol the same way gas
Rafael Espindola [Sat, 10 Dec 2011 02:28:43 +0000 (02:28 +0000)]
Handle expressions of the form _GLOBAL_OFFSET_TABLE_-symbol the same way gas
does. The _GLOBAL_OFFSET_TABLE_ is still magical in that we get a R_386_GOTPC,
but it doesn't change the immediate in the same way as when the expression
has no right hand side symbol.

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

12 years agoLSR: ignore strides in outer loops.
Andrew Trick [Sat, 10 Dec 2011 00:25:00 +0000 (00:25 +0000)]
LSR: ignore strides in outer loops.

Since we're not rewriting IVs in other loops, there's not much reason
to consider their stride when generating formulae.
This should reduce the number of useless formulas considered by LSR.

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

12 years agoARM add some more pre-UAL VFP mnemonics for convenience when porting old code.
Jim Grosbach [Sat, 10 Dec 2011 00:01:02 +0000 (00:01 +0000)]
ARM add some more pre-UAL VFP mnemonics for convenience when porting old code.

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

12 years agoSplats can contain undef's; make sure to handle them correctly. PR11526.
Eli Friedman [Fri, 9 Dec 2011 23:54:42 +0000 (23:54 +0000)]
Splats can contain undef's; make sure to handle them correctly.  PR11526.

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

12 years agoARM add some pre-UAL VFP mnemonics for convenience when porting old code.
Jim Grosbach [Fri, 9 Dec 2011 23:34:09 +0000 (23:34 +0000)]
ARM add some pre-UAL VFP mnemonics for convenience when porting old code.

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

12 years agounittests/Support/Path.cpp: [recursive_directory_iterator] Work around for end iterator.
NAKAMURA Takumi [Fri, 9 Dec 2011 23:20:03 +0000 (23:20 +0000)]
unittests/Support/Path.cpp: [recursive_directory_iterator] Work around for end iterator.

FIXME: It should be more robust.

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

12 years agoAdd dump method for debugging.
Bill Wendling [Fri, 9 Dec 2011 23:18:34 +0000 (23:18 +0000)]
Add dump method for debugging.

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

12 years agoRandom cleanups. No description changes.
Bill Wendling [Fri, 9 Dec 2011 22:41:40 +0000 (22:41 +0000)]
Random cleanups. No description changes.

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

12 years agoARM allows '' syntax, not just '#imm' for assembly.
Jim Grosbach [Fri, 9 Dec 2011 22:25:03 +0000 (22:25 +0000)]
ARM allows '' syntax, not just '#imm' for assembly.

Backwards compatibility with 'gas'. #imm is the preferered and documented
syntax, but lots of existing code uses the '$' prefix, so we should
support it if we can.

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

12 years ago[asan] call __asan_init from .preinit_array. This simplifies __asan_init vs malloc...
Kostya Serebryany [Fri, 9 Dec 2011 22:09:32 +0000 (22:09 +0000)]
[asan] call __asan_init from .preinit_array. This simplifies __asan_init vs malloc chicken-and-egg situation on Android and probably on other flavours of Linux. Patch by eugenis@google.com.

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

12 years agoARM assembly aliases for BIC<-->AND (immediate).
Jim Grosbach [Fri, 9 Dec 2011 22:02:17 +0000 (22:02 +0000)]
ARM assembly aliases for BIC<-->AND (immediate).

When the immediate operand of an AND or BIC instruction isn't representable
in the immediate field of the instruction, but the bitwise negation of the
immediate is, assemble the instruction as the inverse operation instead
with the inverted immediate as the operand.

rdar://10550057

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

12 years agoUpdate test to something more sensible.
Evan Cheng [Fri, 9 Dec 2011 21:54:10 +0000 (21:54 +0000)]
Update test to something more sensible.

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

12 years agoARM NEON data type aliases for VBIC(register).
Jim Grosbach [Fri, 9 Dec 2011 21:46:04 +0000 (21:46 +0000)]
ARM NEON data type aliases for VBIC(register).

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

12 years agoARM assembly parsing and encoding for VLD2 with writeback.
Jim Grosbach [Fri, 9 Dec 2011 21:28:25 +0000 (21:28 +0000)]
ARM assembly parsing and encoding for VLD2 with writeback.

Refactor the instructions into fixed writeback and register-stride
writeback variants to simplify the offset operand (no more optional
register operand using reg0). This is a simpler representation and allows
the assembly parser to more easily handle these instructions.

Add tests for the instruction variants now supported.

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

12 years agoSplitBlockPredecessors uses ArrayRef instead of Data and Size.
Jakub Staszak [Fri, 9 Dec 2011 21:19:53 +0000 (21:19 +0000)]
SplitBlockPredecessors uses ArrayRef instead of Data and Size.

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

12 years ago[fast-isel] Add support for selecting insertvalue.
Chad Rosier [Fri, 9 Dec 2011 20:09:54 +0000 (20:09 +0000)]
[fast-isel] Add support for selecting insertvalue.
rdar://10530851

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

12 years agoHandle reloc_signed_4byte in here. Not doing so was a regression from my
Rafael Espindola [Fri, 9 Dec 2011 19:57:29 +0000 (19:57 +0000)]
Handle reloc_signed_4byte in here. Not doing so was a regression from my
previous commit. It is strange that we see it in 32 bits. We already
have a fixme about it.

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

12 years agoUser a helper overload for a common pattern.
Jakob Stoklund Olesen [Fri, 9 Dec 2011 19:44:39 +0000 (19:44 +0000)]
User a helper overload for a common pattern.

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

12 years agoRevert r146041 et al. The FunctionPass doesn't take an address but the ID.
Bill Wendling [Fri, 9 Dec 2011 19:11:02 +0000 (19:11 +0000)]
Revert r146041 et al. The FunctionPass doesn't take an address but the ID.

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

12 years agoTidy up. Better base class factoring.
Jim Grosbach [Fri, 9 Dec 2011 19:07:20 +0000 (19:07 +0000)]
Tidy up. Better base class factoring.

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

12 years agoTidy up. Better base class factoring.
Jim Grosbach [Fri, 9 Dec 2011 18:54:11 +0000 (18:54 +0000)]
Tidy up. Better base class factoring.

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

12 years agoTweak debugging output.
Jakob Stoklund Olesen [Fri, 9 Dec 2011 18:20:35 +0000 (18:20 +0000)]
Tweak debugging output.

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

12 years agoThe second part of support for generating dwarf for assembly source files. This
Kevin Enderby [Fri, 9 Dec 2011 18:09:40 +0000 (18:09 +0000)]
The second part of support for generating dwarf for assembly source files.  This
generates the dwarf Compile Unit DIE and a dwarf subprogram DIE for each
non-temporary label.

The next part will be to get the clang driver to enable this when assembling
a .s file.  rdar://9275556

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

12 years agoThis is now implemented.
Benjamin Kramer [Fri, 9 Dec 2011 15:45:57 +0000 (15:45 +0000)]
This is now implemented.

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

12 years agoX86: Add patterns for the various rounding ops for SSE4.1 and AVX.
Benjamin Kramer [Fri, 9 Dec 2011 15:44:03 +0000 (15:44 +0000)]
X86: Add patterns for the various rounding ops for SSE4.1 and AVX.

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

12 years agoX86: Split (v)rounds[sd] into a normal and an intrinsic version.
Benjamin Kramer [Fri, 9 Dec 2011 15:43:55 +0000 (15:43 +0000)]
X86: Split (v)rounds[sd] into a normal and an intrinsic version.

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

12 years agoMove isUnpredicatedTerminator() default implementation to TargetInstrInfoImpl to...
Evan Cheng [Fri, 9 Dec 2011 06:41:08 +0000 (06:41 +0000)]
Move isUnpredicatedTerminator() default implementation to TargetInstrInfoImpl to break Target's dependency on CodeGen.

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

12 years agoRemove hasSSE1orAVX(). It's the same as hasXMM().
Evan Cheng [Fri, 9 Dec 2011 06:32:46 +0000 (06:32 +0000)]
Remove hasSSE1orAVX(). It's the same as hasXMM().

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

12 years agoAdd -unroll-runtime for unrolling loops with run-time trip counts.
Andrew Trick [Fri, 9 Dec 2011 06:19:40 +0000 (06:19 +0000)]
Add -unroll-runtime for unrolling loops with run-time trip counts.

Patch by Brendon Cahoon!

This extends the existing LoopUnroll and LoopUnrollPass. Brendon
measured no regressions in the llvm test suite with -unroll-runtime
enabled. This implementation works by using the existing loop
unrolling code to unroll the loop by a power-of-two (default 8). It
generates an if-then-else sequence of code prior to the loop to
execute the extra iterations before entering the unrolled loop.

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

12 years agoForgot setting -march.
Evan Cheng [Fri, 9 Dec 2011 06:15:00 +0000 (06:15 +0000)]
Forgot setting -march.

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

12 years agoFix InitializeNativeTargetAsmParser in CMake builds by defining the
Chandler Carruth [Fri, 9 Dec 2011 03:31:58 +0000 (03:31 +0000)]
Fix InitializeNativeTargetAsmParser in CMake builds by defining the
appropriate macro. Patch by Alexey Prokhin. Fixes PR11498.

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

12 years agoHandle the case of the magical _GLOBAL_OFFSET_TABLE_ showing up in a
Rafael Espindola [Fri, 9 Dec 2011 03:03:58 +0000 (03:03 +0000)]
Handle the case of the magical _GLOBAL_OFFSET_TABLE_ showing up in a
symbol difference. This matches gas behavior and fixes PR11513.

We still don't handle _GLOBAL_OFFSET_TABLE_ in data sections.

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

12 years agoTypo.
Chad Rosier [Fri, 9 Dec 2011 02:00:44 +0000 (02:00 +0000)]
Typo.

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

12 years agoRename WrapperPIC. It is now used for both pic and static.
Akira Hatanaka [Fri, 9 Dec 2011 01:53:17 +0000 (01:53 +0000)]
Rename WrapperPIC. It is now used for both pic and static.

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

12 years agojalr should use t9 ($25) for indirect calls regardless of the relocation model
Akira Hatanaka [Fri, 9 Dec 2011 01:45:12 +0000 (01:45 +0000)]
jalr should use t9 ($25) for indirect calls regardless of the relocation model
specified.

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

12 years agoFix comment.
Devang Patel [Fri, 9 Dec 2011 01:25:04 +0000 (01:25 +0000)]
Fix comment.

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

12 years agoUpdate stale comment.
Devang Patel [Fri, 9 Dec 2011 01:18:48 +0000 (01:18 +0000)]
Update stale comment.

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

12 years agoFix a couple of logic bugs in TargetLowering::SimplifyDemandedBits. PR11514.
Eli Friedman [Fri, 9 Dec 2011 01:16:26 +0000 (01:16 +0000)]
Fix a couple of logic bugs in TargetLowering::SimplifyDemandedBits.  PR11514.

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

12 years agounittests/SupportTests: Fix test. pop modifies the current entry, thus the
Michael J. Spencer [Fri, 9 Dec 2011 01:14:41 +0000 (01:14 +0000)]
unittests/SupportTests: Fix test. pop modifies the current entry, thus the
dontlookhere check must be after it.

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

12 years agounittests/SupportTests: Add some outs()'s to debug the issues on some bots.
Michael J. Spencer [Fri, 9 Dec 2011 00:45:09 +0000 (00:45 +0000)]
unittests/SupportTests: Add some outs()'s to debug the issues on some bots.
I have run these tests under many configurations on the exact same OS as
the failures, and I can't reproduce them :(.

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

12 years agoRevert r146184. I am seeing performance regression cause by this patch in one test...
Devang Patel [Thu, 8 Dec 2011 23:52:00 +0000 (23:52 +0000)]
Revert r146184. I am seeing performance regression cause by this patch in one test case.

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

12 years agoARM convenience aliases for VSQRT.
Jim Grosbach [Thu, 8 Dec 2011 22:51:25 +0000 (22:51 +0000)]
ARM convenience aliases for VSQRT.

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

12 years agoSupport/FileSystem: Implement recursive_directory_iterator and make
Michael J. Spencer [Thu, 8 Dec 2011 22:50:09 +0000 (22:50 +0000)]
Support/FileSystem: Implement recursive_directory_iterator and make
directory_iterator preserve InputIterator semantics on copy.

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

12 years agoFix infinite loop in DSE when deleting a free in a reachable loop that's also
Nick Lewycky [Thu, 8 Dec 2011 22:36:35 +0000 (22:36 +0000)]
Fix infinite loop in DSE when deleting a free in a reachable loop that's also
trivially infinite.

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

12 years agoAdd 256-bit variant vmovss and vmovsd patterns. rdar://10538417
Evan Cheng [Thu, 8 Dec 2011 22:30:45 +0000 (22:30 +0000)]
Add 256-bit variant vmovss and vmovsd patterns. rdar://10538417

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

12 years agoRemove reference to dead GEPSplitterPass. PR11506.
Eli Friedman [Thu, 8 Dec 2011 22:28:17 +0000 (22:28 +0000)]
Remove reference to dead GEPSplitterPass.  PR11506.

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

12 years agoARM 64-bit VEXT assembly uses a .64 suffix, not .32, amazingly enough.
Jim Grosbach [Thu, 8 Dec 2011 22:19:04 +0000 (22:19 +0000)]
ARM 64-bit VEXT assembly uses a .64 suffix, not .32, amazingly enough.

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

12 years agoEnhance both TargetLibraryInfo and SelectionDAGBuilder so that the latter can use...
Owen Anderson [Thu, 8 Dec 2011 22:15:21 +0000 (22:15 +0000)]
Enhance both TargetLibraryInfo and SelectionDAGBuilder so that the latter can use the former to prevent the formation of libm SDNode's when  -fno-builtin is passed.

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

12 years agoARM VSHR implied destination operand form aliases.
Jim Grosbach [Thu, 8 Dec 2011 22:06:06 +0000 (22:06 +0000)]
ARM VSHR implied destination operand form aliases.

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

12 years agoAdd various missing AVX patterns which was causing crashes. Sadly, the generated
Evan Cheng [Thu, 8 Dec 2011 22:05:28 +0000 (22:05 +0000)]
Add various missing AVX patterns which was causing crashes. Sadly, the generated
code looks pretty bad compared to SSE.

rdar://10538793

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

12 years agoTidy up a bit.
Jim Grosbach [Thu, 8 Dec 2011 22:04:40 +0000 (22:04 +0000)]
Tidy up a bit.

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

12 years agoRefactor. No intentional functionality change.
Devang Patel [Thu, 8 Dec 2011 21:48:01 +0000 (21:48 +0000)]
Refactor. No intentional functionality change.

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

12 years agoAdd rather verbose stats for fast-isel failures.
Chad Rosier [Thu, 8 Dec 2011 21:37:10 +0000 (21:37 +0000)]
Add rather verbose stats for fast-isel failures.

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

12 years agoARM asm parser, just issue a warning for a duplicate reg in a list.
Jim Grosbach [Thu, 8 Dec 2011 21:34:20 +0000 (21:34 +0000)]
ARM asm parser, just issue a warning for a duplicate reg in a list.

For better 'gas' compatibility.

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

12 years agoFilter "sink to" candidate blocks sooner. This avoids unnecessary computation to...
Devang Patel [Thu, 8 Dec 2011 21:33:23 +0000 (21:33 +0000)]
Filter "sink to" candidate blocks sooner. This avoids unnecessary computation to determine whether the block dominates all uses or not.

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

12 years agoPass a GlobalAddress instead of an ExternalSymbol to LowerCallTo in
Akira Hatanaka [Thu, 8 Dec 2011 21:05:38 +0000 (21:05 +0000)]
Pass a GlobalAddress instead of an ExternalSymbol to LowerCallTo in
MipsTargetLowering::LowerGlobalTLSAddress. This is necessary to have
call16(__tls_get_addr) emitted instead of got_disp(__tls_get_addr) when the
target is Mips64.

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

12 years agoARM VSUB implied destination operand form aliases.
Jim Grosbach [Thu, 8 Dec 2011 20:56:26 +0000 (20:56 +0000)]
ARM VSUB implied destination operand form aliases.

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

12 years agoTidy up a bit.
Jim Grosbach [Thu, 8 Dec 2011 20:53:19 +0000 (20:53 +0000)]
Tidy up a bit.

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

12 years agoDon't explicitly marked libm rounding ops as legal on SSE4.1/AVX. There don't seem...
Owen Anderson [Thu, 8 Dec 2011 20:51:38 +0000 (20:51 +0000)]
Don't explicitly marked libm rounding ops as legal on SSE4.1/AVX.  There don't seem to be patterns for these, so I don't know why they were marked legal in the first place.
Fixes failures caused by r146171.

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

12 years agoARM VQADD implied destination operand form aliases.
Jim Grosbach [Thu, 8 Dec 2011 20:49:43 +0000 (20:49 +0000)]
ARM VQADD implied destination operand form aliases.

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

12 years agoARM a few more VMUL implied destination operand form aliases.
Jim Grosbach [Thu, 8 Dec 2011 20:42:35 +0000 (20:42 +0000)]
ARM a few more VMUL implied destination operand form aliases.

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

12 years agoImplement 64-bit support for thread local storage handling.
Akira Hatanaka [Thu, 8 Dec 2011 20:34:32 +0000 (20:34 +0000)]
Implement 64-bit support for thread local storage handling.

- Modify lowering of global TLS address nodes.
- Modify isel of ThreadPointer.
- Wrap target global TLS address nodes that are operands of loads with WrapperPIC.
- Remove Mips-specific DAG nodes TlsGd, TprelHi and TprelLo, which can be
  substituted with other existing nodes.

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

12 years agoTeach SelectionDAG to match more calls to libm functions onto existing SDNodes. ...
Owen Anderson [Thu, 8 Dec 2011 19:32:14 +0000 (19:32 +0000)]
Teach SelectionDAG to match more calls to libm functions onto existing SDNodes.  Mark these nodes as illegal by default, unless the target declares otherwise.

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

12 years agoARM assembler support for register name aliases.
Jim Grosbach [Thu, 8 Dec 2011 19:27:38 +0000 (19:27 +0000)]
ARM assembler support for register name aliases.

rdar://10550084

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

12 years agoMake MachineInstr instruction property queries more flexible. This change all
Evan Cheng [Thu, 8 Dec 2011 19:23:10 +0000 (19:23 +0000)]
Make MachineInstr instruction property queries more flexible. This change all
clients to decide whether to look inside bundled instructions and whether
the query should return true if any / all bundled instructions have the
queried property.

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

12 years agoAdd test for r146163.
Evan Cheng [Thu, 8 Dec 2011 19:21:39 +0000 (19:21 +0000)]
Add test for r146163.

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

12 years agoMany of the SSE patterns should not be selected when AVX is available. This led to...
Evan Cheng [Thu, 8 Dec 2011 19:00:42 +0000 (19:00 +0000)]
Many of the SSE patterns should not be selected when AVX is available. This led to the following code in X86Subtarget.cpp

  if (HasAVX)
    X86SSELevel = NoMMXSSE;

This is so patterns that are predicated on hasSSE3, etc. would not be selected when avx is available. Instead, the AVX variant is selected.
However, this breaks instructions which do not have AVX variants.

The right way to fix this is for the SSE but not-AVX patterns to predicate on something like hasSSE3() && !hasAVX().
Then we can take out the hack in X86Subtarget.cpp. Patterns which do not have AVX variants do not need to change.

However, we need to audit all the patterns before we make the change. This patch is workaround that fixes one specific case,
the prefetch instructions. rdar://10538297

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

12 years agoRevert r146143, "Fix bug 9905: Failure in code selection for llvm intrinsics
Daniel Dunbar [Thu, 8 Dec 2011 17:32:18 +0000 (17:32 +0000)]
Revert r146143, "Fix bug 9905: Failure in code selection for llvm intrinsics
sqrt/exp (fix for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP,
FEXP2).", it is failing tests.

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

12 years agotest/CodeGen/X86/vec_compare-2.ll: Add explicit -mtriple=i686-linux.
NAKAMURA Takumi [Thu, 8 Dec 2011 15:24:09 +0000 (15:24 +0000)]
test/CodeGen/X86/vec_compare-2.ll: Add explicit -mtriple=i686-linux.

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

12 years agoSrc2 and src3 were accidentally swapped for the FMA4 rr patterns. Undo this and fix...
Jan Sjödin [Thu, 8 Dec 2011 14:43:19 +0000 (14:43 +0000)]
Src2 and src3 were accidentally swapped for the FMA4 rr patterns. Undo this and fix the encoding.

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

12 years agoFix a bug in the integer-promotion of bitcast operations on vector types.
Nadav Rotem [Thu, 8 Dec 2011 13:10:01 +0000 (13:10 +0000)]
Fix a bug in the integer-promotion of bitcast operations on vector types.
We must not issue a bitcast operation for integer-promotion of vector types, because the
location of the values in the vector may be different.

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

12 years agoFix bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT...
Stepan Dyatkovskiy [Thu, 8 Dec 2011 07:55:03 +0000 (07:55 +0000)]
Fix bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2).

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

12 years agoMTCTR needs to be glued to BCTR so that CTR is not marked dead in MTCTR (another...
Hal Finkel [Thu, 8 Dec 2011 04:36:44 +0000 (04:36 +0000)]
MTCTR needs to be glued to BCTR so that CTR is not marked dead in MTCTR (another find by -verify-machineinstrs)

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

12 years agoReverting r145899 as it breaks clang self-hosting
Pete Cooper [Thu, 8 Dec 2011 03:24:10 +0000 (03:24 +0000)]
Reverting r145899 as it breaks clang self-hosting

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

12 years agoARM NEON two-operand aliases for VSHL(immediate).
Jim Grosbach [Thu, 8 Dec 2011 01:30:04 +0000 (01:30 +0000)]
ARM NEON two-operand aliases for VSHL(immediate).

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

12 years agoDrop the HasInlineAsm flag.
Jakob Stoklund Olesen [Thu, 8 Dec 2011 01:22:39 +0000 (01:22 +0000)]
Drop the HasInlineAsm flag.

It is not used any more. We are tracking inline assembly misalignments
directly through the BBInfo.Unalign and KnownBits fields.

A simple conservative size estimate is not good enough since it can
cause alignment padding to be underestimated.

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

12 years agoARM NEON two-operand aliases for VSHL(register).
Jim Grosbach [Thu, 8 Dec 2011 01:12:35 +0000 (01:12 +0000)]
ARM NEON two-operand aliases for VSHL(register).

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

12 years agoSimplify offset verification.
Jakob Stoklund Olesen [Thu, 8 Dec 2011 01:10:05 +0000 (01:10 +0000)]
Simplify offset verification.

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

12 years agoFix copy/past-o.
Jim Grosbach [Thu, 8 Dec 2011 01:02:26 +0000 (01:02 +0000)]
Fix copy/past-o.

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