oota-llvm.git
13 years agoIt is safe to ignore LastSplitPoint when the variable is not live out.
Jakob Stoklund Olesen [Wed, 23 Feb 2011 18:26:31 +0000 (18:26 +0000)]
It is safe to ignore LastSplitPoint when the variable is not live out.

No code will be inserted after the split point anyway.

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

13 years agoAdd XCore intrinsic for the setv instruction.
Richard Osborne [Wed, 23 Feb 2011 16:46:37 +0000 (16:46 +0000)]
Add XCore intrinsic for the setv instruction.

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

13 years agoFix format for setc instruction.
Richard Osborne [Wed, 23 Feb 2011 15:20:16 +0000 (15:20 +0000)]
Fix format for setc instruction.

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

13 years agoAdd XCore intrinsic for settw instruction.
Richard Osborne [Wed, 23 Feb 2011 14:45:03 +0000 (14:45 +0000)]
Add XCore intrinsic for settw instruction.

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

13 years agoImplement TODO for implicit C-array-to-ArrayRef conversion.
Frits van Bommel [Wed, 23 Feb 2011 13:43:06 +0000 (13:43 +0000)]
Implement TODO for implicit C-array-to-ArrayRef conversion.

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

13 years agoExport TARGET_TRIPLE on LLVM.cmake. It is necessary for running tests
Oscar Fuentes [Wed, 23 Feb 2011 11:28:40 +0000 (11:28 +0000)]
Export TARGET_TRIPLE on LLVM.cmake. It is necessary for running tests
on Clang when it builds using LLVM as an external library.

Fixes PR9293.

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

13 years agoFixed a bug in the enhanced disassembler that caused
Sean Callanan [Wed, 23 Feb 2011 03:31:28 +0000 (03:31 +0000)]
Fixed a bug in the enhanced disassembler that caused
it to ignore valid uses of FS and GS as additional
base registers in address computations.  Added a test
case for this.

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

13 years agoFixed a bug in the enhanced disassembly tester that
Sean Callanan [Wed, 23 Feb 2011 03:29:41 +0000 (03:29 +0000)]
Fixed a bug in the enhanced disassembly tester that
caused it to only parse one line of input.

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

13 years agoChange VFPNeonA8 definition to make the code easier to read.
Evan Cheng [Wed, 23 Feb 2011 02:35:33 +0000 (02:35 +0000)]
Change VFPNeonA8 definition to make the code easier to read.

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

13 years agoOmit private_extern declarations of extern symbols; followup to
Stuart Hastings [Wed, 23 Feb 2011 02:27:05 +0000 (02:27 +0000)]
Omit private_extern declarations of extern symbols; followup to
r124468.  Patch by Rafael Avila de Espindola!

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

13 years agoMore fcopysign correctness and performance fix.
Evan Cheng [Wed, 23 Feb 2011 02:24:55 +0000 (02:24 +0000)]
More fcopysign correctness and performance fix.
The previous codegen for the slow path (when values are in VFP / NEON
registers) was incorrect if the source is NaN.

The new codegen uses NEON vbsl instruction to copy the sign bit. e.g.
        vmov.i32        d1, #0x80000000
        vbsl    d1, d2, d0
If NEON is not available, it uses integer instructions to copy the sign bit.
rdar://9034702

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

13 years agoKeep track of how many times a live range has been dequeued, and prioritize new ranges.
Jakob Stoklund Olesen [Wed, 23 Feb 2011 00:56:56 +0000 (00:56 +0000)]
Keep track of how many times a live range has been dequeued, and prioritize new ranges.

When a large live range is evicted, it will usually be split when it comes
around again. By deferring evicted live ranges, the splitting happens at a time
when the interference pattern is more realistic. This prevents repeated
splitting and evictions.

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

13 years agoFix a bug in determining if there is only a single interfering register.
Jakob Stoklund Olesen [Wed, 23 Feb 2011 00:29:55 +0000 (00:29 +0000)]
Fix a bug in determining if there is only a single interfering register.

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

13 years agoBe more aggressive about evicting interference.
Jakob Stoklund Olesen [Wed, 23 Feb 2011 00:29:52 +0000 (00:29 +0000)]
Be more aggressive about evicting interference.

Use interval sizes instead of spill weights to determine if it is legal to evict
interference. A smaller interval can evict interference if all interfering live
ranges are larger.

Allow multiple interferences to be evicted as along as they are all larger than
the live range being allocated.

Spill weights are still used to select the preferred eviction candidate.

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

13 years ago[AVX] General VUNPCKL codegen support.
David Greene [Tue, 22 Feb 2011 23:31:46 +0000 (23:31 +0000)]
[AVX] General VUNPCKL codegen support.

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

13 years agoFix Builder::execute() to more properly pass the desired environment
David Greene [Tue, 22 Feb 2011 23:30:45 +0000 (23:30 +0000)]
Fix Builder::execute() to more properly pass the desired environment
to tools.

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

13 years agoChange the RAGreedy register assignment order so large live ranges are allocated...
Jakob Stoklund Olesen [Tue, 22 Feb 2011 23:01:52 +0000 (23:01 +0000)]
Change the RAGreedy register assignment order so large live ranges are allocated first.

This is based on the observation that long live ranges are more difficult to
allocate, so there is a better chance of solving the puzzle by handling the big
pieces first. The allocator will evict and split long alive ranges when they get
in the way.

RABasic is still using spill weights for its priority queue, so the interface to
the queue has been virtualized.

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

13 years ago80 Col.
Jakob Stoklund Olesen [Tue, 22 Feb 2011 23:01:49 +0000 (23:01 +0000)]
80 Col.

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

13 years agoFix C++0x incompatibility. The signature of std::make_pair<> changes from:
Nick Lewycky [Tue, 22 Feb 2011 22:48:47 +0000 (22:48 +0000)]
Fix C++0x incompatibility. The signature of std::make_pair<> changes from:
  template <class T1, class T2> pair<T1,T2> make_pair(const T1&, const T2&);
to
  template <class T1, class T2> pair<V1, V2> make_pair(T1&&, T2&&);
so explicitly specifying the template arguments to make_pair<> is going to break
when C++0x rolls through. Replace them with equivalent std::pair<>. Patch by
James Dennett!

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

13 years agoMake LoopDeletion work on loops with multiple edges, as long as the incoming
Cameron Zwarich [Tue, 22 Feb 2011 22:25:39 +0000 (22:25 +0000)]
Make LoopDeletion work on loops with multiple edges, as long as the incoming
values from all of the loop's exiting blocks are equal. Patch by Andrew Clinton.

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

13 years agoUse the same (%dx) hack for in[bwl] as for out[bwl].
Joerg Sonnenberger [Tue, 22 Feb 2011 20:40:09 +0000 (20:40 +0000)]
Use the same (%dx) hack for in[bwl] as for out[bwl].

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

13 years agoVFP single precision arith instructions can go down to NEON pipeline, but on Cortex...
Evan Cheng [Tue, 22 Feb 2011 19:53:14 +0000 (19:53 +0000)]
VFP single precision arith instructions can go down to NEON pipeline, but on Cortex-A8 only.

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

13 years agoFollow LLVM coding style.
Devang Patel [Tue, 22 Feb 2011 18:56:12 +0000 (18:56 +0000)]
Follow LLVM coding style.
clang uses DBuilder, so it requries corresponding change.

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

13 years agoStack alignment is 16 bytes on FreeBSD/i386 too.
Roman Divacky [Tue, 22 Feb 2011 17:30:05 +0000 (17:30 +0000)]
Stack alignment is 16 bytes on FreeBSD/i386 too.

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

13 years agoBug#9172: Don't use static in file scope, use an attribute on the
Joerg Sonnenberger [Tue, 22 Feb 2011 16:53:11 +0000 (16:53 +0000)]
Bug#9172: Don't use static in file scope, use an attribute on the
parser.

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

13 years agoCMake: remove unnecessary variable.
Oscar Fuentes [Tue, 22 Feb 2011 15:40:20 +0000 (15:40 +0000)]
CMake: remove unnecessary variable.

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

13 years agoMachineConstantPoolValues are not uniqued, so they need to be freed if they
Cameron Zwarich [Tue, 22 Feb 2011 08:54:30 +0000 (08:54 +0000)]
MachineConstantPoolValues are not uniqued, so they need to be freed if they
share entries. Add a DenseSet to MachineConstantPool for the MachineCPVs that
it owns.

This will hopefully fix the MC/ARM/elf-reloc-01.ll failure on the leaks bots.

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

13 years agoRevert r126195, "test/CodeGen/X86/vec_cast.ll: Mark as XFAIL: migw,win32 for workarou...
NAKAMURA Takumi [Tue, 22 Feb 2011 08:22:54 +0000 (08:22 +0000)]
Revert r126195, "test/CodeGen/X86/vec_cast.ll: Mark as XFAIL: migw,win32 for workaround of PR8311."

It seems it affected configuration --target=i686-pc-mingw32, I don't know and will investigate why.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:21:59 +0000 (07:21 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:21:51 +0000 (07:21 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:21:42 +0000 (07:21 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:21:33 +0000 (07:21 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:21:25 +0000 (07:21 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:21:17 +0000 (07:21 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

On @foobar(double %d, double* %x),
AMD64: (%xmm0, %rdi)
Win64: (%xmm0, %rdx) (not %rcx!)

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:21:08 +0000 (07:21 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:21:01 +0000 (07:21 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:20:52 +0000 (07:20 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:20:44 +0000 (07:20 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:20:35 +0000 (07:20 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:20:26 +0000 (07:20 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:20:18 +0000 (07:20 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:20:10 +0000 (07:20 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:20:02 +0000 (07:20 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:19:54 +0000 (07:19 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:19:46 +0000 (07:19 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:19:37 +0000 (07:19 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:19:28 +0000 (07:19 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:19:20 +0000 (07:19 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agoRelax expressions and add explicit triplets -linux and -win32.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:19:12 +0000 (07:19 +0000)]
Relax expressions and add explicit triplets -linux and -win32.

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

13 years agotest/CodeGen/X86/vec_cast.ll: Mark as XFAIL: migw,win32 for workaround of PR8311.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:19:03 +0000 (07:19 +0000)]
test/CodeGen/X86/vec_cast.ll: Mark as XFAIL: migw,win32 for workaround of PR8311.

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

13 years agotest/CodeGen/X86/red-zone.ll: Add explicit -mtriple=x86_64-linux.
NAKAMURA Takumi [Tue, 22 Feb 2011 07:18:55 +0000 (07:18 +0000)]
test/CodeGen/X86/red-zone.ll: Add explicit -mtriple=x86_64-linux.

Redzone is not applicable on Win64.

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

13 years agoGuard against de-referencing MBB.end().
Evan Cheng [Tue, 22 Feb 2011 07:07:59 +0000 (07:07 +0000)]
Guard against de-referencing MBB.end().

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

13 years agoavailable_externally (hidden or not) GVs are always accessed via stubs. rdar://9027648.
Evan Cheng [Tue, 22 Feb 2011 06:58:34 +0000 (06:58 +0000)]
available_externally (hidden or not) GVs are always accessed via stubs. rdar://9027648.

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

13 years agoVirtRegRewriter assertion fix.
Andrew Trick [Tue, 22 Feb 2011 06:52:56 +0000 (06:52 +0000)]
VirtRegRewriter assertion fix.
Apparently it's ok for multiple operands to "kill" the same register.
Fixes PR9237.

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

13 years agoRoll out r126169 and r126170 in an attempt to fix the selfhost bot.
Cameron Zwarich [Tue, 22 Feb 2011 03:24:52 +0000 (03:24 +0000)]
Roll out r126169 and r126170 in an attempt to fix the selfhost bot.

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

13 years agoAdded a testcase for the enhanced disassembly bug
Sean Callanan [Tue, 22 Feb 2011 02:19:18 +0000 (02:19 +0000)]
Added a testcase for the enhanced disassembly bug
fixed in r126147, where a field in the X86 decode
structure was being read as bits, not bytes.

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

13 years agoFixed llvm-mc in edis mode to use the result of
Sean Callanan [Tue, 22 Feb 2011 02:09:15 +0000 (02:09 +0000)]
Fixed llvm-mc in edis mode to use the result of
operand.evaluate as an error code, not as the
contents of the operand.

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

13 years agoFixed lit.cfg to no longer recognize the old
Sean Callanan [Tue, 22 Feb 2011 02:05:53 +0000 (02:05 +0000)]
Fixed lit.cfg to no longer recognize the old
edis name as needing expansion.  This tool was
been replaced by llvm-mc long ago.

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

13 years agoOnly use blx for external function calls on thumb, these could be fixed
Eric Christopher [Tue, 22 Feb 2011 01:37:10 +0000 (01:37 +0000)]
Only use blx for external function calls on thumb, these could be fixed
up by the dynamic linker, but it's better to use the correct instruction
to begin with.

Fixes rdar://9011034

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

13 years agoEliminate valgrind warnings from Python on the 32-bit as well.
Cameron Zwarich [Tue, 22 Feb 2011 01:00:10 +0000 (01:00 +0000)]
Eliminate valgrind warnings from Python on the 32-bit as well.

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

13 years agoMerge information about the number of zero, one, and sign bits of live-out registers
Cameron Zwarich [Tue, 22 Feb 2011 00:46:27 +0000 (00:46 +0000)]
Merge information about the number of zero, one, and sign bits of live-out registers
at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine
phase. This fixes <rdar://problem/8760114>.

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

13 years agoHave isel visit blocks in reverse postorder rather than an undefined order. This
Cameron Zwarich [Tue, 22 Feb 2011 00:46:22 +0000 (00:46 +0000)]
Have isel visit blocks in reverse postorder rather than an undefined order. This
allows for the information propagated across basic blocks to be merged at phis.

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

13 years agoRecognize loopz and loopnz as aliases for loope and loopne.
Joerg Sonnenberger [Tue, 22 Feb 2011 00:43:07 +0000 (00:43 +0000)]
Recognize loopz and loopnz as aliases for loope and loopne.
From Dimitry Andric.

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

13 years agoImplement xgetbv and xsetbv.
Rafael Espindola [Tue, 22 Feb 2011 00:35:18 +0000 (00:35 +0000)]
Implement xgetbv and xsetbv.
Patch by Jai Menon.

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

13 years agoRevert r125960, it's breaking darwin10 bootstrap.
Eric Christopher [Mon, 21 Feb 2011 23:52:19 +0000 (23:52 +0000)]
Revert r125960, it's breaking darwin10 bootstrap.

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

13 years agoSkipping over debugvalue instructions to determine whether the split spot is in a...
Evan Cheng [Mon, 21 Feb 2011 23:40:47 +0000 (23:40 +0000)]
Skipping over debugvalue instructions to determine whether the split spot is in a IT block. rdar://9030770

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

13 years agoAdd more debugging output.
Evan Cheng [Mon, 21 Feb 2011 23:39:48 +0000 (23:39 +0000)]
Add more debugging output.

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

13 years agoHandle FK_PCRel_1 and add a test case for this and FK_PCRel_4.
Joerg Sonnenberger [Mon, 21 Feb 2011 23:25:41 +0000 (23:25 +0000)]
Handle FK_PCRel_1 and add a test case for this and FK_PCRel_4.

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

13 years agoRevert r124611 - "Keep track of incoming argument's location while emitting LiveIns."
Devang Patel [Mon, 21 Feb 2011 23:21:26 +0000 (23:21 +0000)]
Revert r124611 - "Keep track of incoming argument's location while emitting LiveIns."
In other words, do not keep track of argument's location.  The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body.
This requires some coordination with debugger to get this working.
 - The debugger needs to be aware of prolog_end attribute attached with line table entries.
 - The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+)

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

13 years agoAdd SplitKit::isOriginalEndpoint and use it to force live range splitting to terminate.
Jakob Stoklund Olesen [Mon, 21 Feb 2011 23:09:46 +0000 (23:09 +0000)]
Add SplitKit::isOriginalEndpoint and use it to force live range splitting to terminate.

An original endpoint is an instruction that killed or defined the original live
range before any live ranges were split.

When splitting global live ranges, avoid creating local live ranges without any
original endpoints. We may still create global live ranges without original
endpoints, but such a range won't be split again, and live range splitting still
terminates.

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

13 years agoFixed a bug in the X86 disassembler where a member of the
Sean Callanan [Mon, 21 Feb 2011 21:55:05 +0000 (21:55 +0000)]
Fixed a bug in the X86 disassembler where a member of the
X86 instruction decode structure was being interpreted as
being in units of bits, although it is actually stored in
units of bytes.

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

13 years agoEnd the line if we return early. Radar 9012638.
Stuart Hastings [Mon, 21 Feb 2011 21:07:07 +0000 (21:07 +0000)]
End the line if we return early.  Radar 9012638.

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

13 years agoAdd a convenience tool for doing comparison builds of the LLVM
David Greene [Mon, 21 Feb 2011 19:23:22 +0000 (19:23 +0000)]
Add a convenience tool for doing comparison builds of the LLVM
ecosystem.  This is a handy utility for checking changes before
committing them to the repository.

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

13 years agoBetter OpenBSD support, patch by Amit Kulkarni. I have no way to test
Chris Lattner [Mon, 21 Feb 2011 18:38:56 +0000 (18:38 +0000)]
Better OpenBSD support, patch by Amit Kulkarni.  I have no way to test
that this doesn't break gold, but it seems reasonable to me.

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

13 years agoAdd XCore intrinsics for various instructions on ports.
Richard Osborne [Mon, 21 Feb 2011 18:23:30 +0000 (18:23 +0000)]
Add XCore intrinsics for various instructions on ports.

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

13 years agoTest case for r126127. Radar 9012638.
Stuart Hastings [Mon, 21 Feb 2011 18:08:40 +0000 (18:08 +0000)]
Test case for r126127.  Radar 9012638.

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

13 years agoThe stack should be 16 byte aligned on 32 bit solaris. Patch by Yuri.
Duncan Sands [Mon, 21 Feb 2011 17:37:17 +0000 (17:37 +0000)]
The stack should be 16 byte aligned on 32 bit solaris.  Patch by Yuri.

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

13 years agoIf the phi node was used by an unreachable instruction that ends up using
Duncan Sands [Mon, 21 Feb 2011 17:32:05 +0000 (17:32 +0000)]
If the phi node was used by an unreachable instruction that ends up using
itself without going via a phi node then we could return false here in
spite of making a change.  Also, tweak the comment because this method
can (and always could) return true without deleting the original phi node.
For example, if the phi node was used by a read-only invoke instruction
which is used by another phi node phi2 which is only used by and only uses
the invoke, then phi2 would be deleted but not the invoke instruction and
not the original phi node.

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

13 years agoFix to correctly support attribute((section("__DATA, __common"))).
Stuart Hastings [Mon, 21 Feb 2011 17:27:17 +0000 (17:27 +0000)]
Fix to correctly support attribute((section("__DATA, __common"))).
Radar 9012638.

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

13 years agoa serious "compare CSE" issue that is nontrivial to get right,
Chris Lattner [Mon, 21 Feb 2011 17:03:47 +0000 (17:03 +0000)]
a serious "compare CSE" issue that is nontrivial to get right,
but which is responsible for us doing really bad things to 256.bzip2.

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

13 years agofix a crasher in disabled code (on variable stride loops)
Chris Lattner [Mon, 21 Feb 2011 17:02:55 +0000 (17:02 +0000)]
fix a crasher in disabled code (on variable stride loops)

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

13 years agoSimplify RecursivelyDeleteDeadPHINode. The only functionality change
Duncan Sands [Mon, 21 Feb 2011 16:27:36 +0000 (16:27 +0000)]
Simplify RecursivelyDeleteDeadPHINode.  The only functionality change
should be that if the phi is used by a side-effect free instruction with
no uses then the phi and the instruction now get zapped (checked by the
unittest).

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

13 years agoTarget/X86/X86FastISel: [PR6275] Fix Win32's dllimport function with fastisel.
NAKAMURA Takumi [Mon, 21 Feb 2011 04:50:06 +0000 (04:50 +0000)]
Target/X86/X86FastISel: [PR6275] Fix Win32's dllimport function with fastisel.

"dllimport" function must not be GlobalVariable, but Function. It is enough to check with GlobalValue.
test/CodeGen/X86/dll-linkage.ll is updated to check llc -O0.

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

13 years agoGenerate correct Sparc32 ABI compliant code for functions that return a struct.
Venkatraman Govindaraju [Mon, 21 Feb 2011 03:42:44 +0000 (03:42 +0000)]
Generate correct Sparc32 ABI compliant code for functions that return a struct.

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

13 years agoCMake: Define LLVM_INCLUDE_TESTS in cmake/modules/HandleLLVMOptions.cmake. It affects...
NAKAMURA Takumi [Mon, 21 Feb 2011 03:21:06 +0000 (03:21 +0000)]
CMake: Define LLVM_INCLUDE_TESTS in cmake/modules/HandleLLVMOptions.cmake. It affects testing stuff on clang-standalone build.

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

13 years agoCMake: Fix breakage on clang standalone build.
NAKAMURA Takumi [Mon, 21 Feb 2011 03:20:57 +0000 (03:20 +0000)]
CMake: Fix breakage on clang standalone build.

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

13 years agoadd a missed loop deletion case.
Chris Lattner [Mon, 21 Feb 2011 02:13:39 +0000 (02:13 +0000)]
add a missed loop deletion case.

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

13 years agoAdd some (disabled code) to print out negative strides.
Chris Lattner [Mon, 21 Feb 2011 02:08:54 +0000 (02:08 +0000)]
Add some (disabled code) to print out negative strides.

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

13 years agoadd an idiom that loop idiom could theoretically catch.
Chris Lattner [Mon, 21 Feb 2011 01:33:38 +0000 (01:33 +0000)]
add an idiom that loop idiom could theoretically catch.

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

13 years agoA lo/hi mul has higher latency than an imul r,ri, e.g. 5 cycles compared to 3
Cameron Zwarich [Mon, 21 Feb 2011 01:29:32 +0000 (01:29 +0000)]
A lo/hi mul has higher latency than an imul r,ri, e.g. 5 cycles compared to 3
on Core 2 and Nehalem, so the code we generate is better than GCC's here.

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

13 years agoUse a vector of pairs to implement the section stack, not two
Joerg Sonnenberger [Mon, 21 Feb 2011 01:07:42 +0000 (01:07 +0000)]
Use a vector of pairs to implement the section stack, not two
independent vectors.

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

13 years agoThe signed version of our "magic number" computation for the integer approximation
Cameron Zwarich [Mon, 21 Feb 2011 00:22:02 +0000 (00:22 +0000)]
The signed version of our "magic number" computation for the integer approximation
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approximations over positive approximations in many
cases. Positive approximations require fewer operations beyond the multiplication.

In the case of division by 3, we still generate code that is a single instruction
larger than GCC's code.

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

13 years agoPut targets on folders, if the IDE supports the feature.
Oscar Fuentes [Sun, 20 Feb 2011 22:06:10 +0000 (22:06 +0000)]
Put targets on folders, if the IDE supports the feature.

Requires CMake 2.8.3 or newer.

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

13 years agoAdd some limited support for labels in org directives. Hopefully enough to fix
Rafael Espindola [Sun, 20 Feb 2011 20:20:07 +0000 (20:20 +0000)]
Add some limited support for labels in org directives. Hopefully enough to fix
PR9245.

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

13 years agoDispose modules early and only create codegen when the plugin is being
Rafael Espindola [Sun, 20 Feb 2011 18:28:29 +0000 (18:28 +0000)]
Dispose modules early and only create codegen when the plugin is being
used by the linker and not by nm or ar.

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

13 years agoMake RecursivelyDeleteDeadPHINode delete a phi node that has no users and add a
Nick Lewycky [Sun, 20 Feb 2011 18:05:56 +0000 (18:05 +0000)]
Make RecursivelyDeleteDeadPHINode delete a phi node that has no users and add a
test for that. With this change, test/CodeGen/X86/codegen-dce.ll no longer finds
any instructions to DCE, so delete the test.

Also renamed J and JP to I and IP in RecursivelyDeleteDeadPHINode.

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

13 years agoFix some memory leaks and avoid looking in the hash tables twice.
Rafael Espindola [Sun, 20 Feb 2011 16:27:25 +0000 (16:27 +0000)]
Fix some memory leaks and avoid looking in the hash tables twice.
libxul links in 7m0.403s.

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

13 years agoRemove the link to Projects.html. It is useless for people working on
Oscar Fuentes [Sun, 20 Feb 2011 15:34:12 +0000 (15:34 +0000)]
Remove the link to Projects.html. It is useless for people working on
Visual Studio.

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

13 years agoMove "A | ~(A & ?) -> -1" from InstCombine to InstructionSimplify.
Benjamin Kramer [Sun, 20 Feb 2011 15:20:01 +0000 (15:20 +0000)]
Move "A | ~(A & ?) -> -1" from InstCombine to InstructionSimplify.

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

13 years agoInstCombine: Add a bunch of combines of the form x | (y ^ z).
Benjamin Kramer [Sun, 20 Feb 2011 13:23:43 +0000 (13:23 +0000)]
InstCombine: Add a bunch of combines of the form x | (y ^ z).

We usually catch this kind of optimization through InstSimplify's distributive
magic, but or doesn't distribute over xor in general.

"A | ~(A | B) -> A | ~B" hits 24 times on gcc.c.

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