oota-llvm.git
13 years agoReapply commit 112699, speculatively reverted by echristo, since
Duncan Sands [Thu, 2 Sep 2010 08:14:03 +0000 (08:14 +0000)]
Reapply commit 112699, speculatively reverted by echristo, since
I'm sure it is harmless.  Original commit message:
If PrototypeValue is erased in the middle of using the SSAUpdator
then the SSAUpdator may access freed memory.  Instead, simply pass
in the type and name explicitly, which is all that was used anyway.

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

13 years agoSilence an ambiguous else warning from GCC.
Chandler Carruth [Thu, 2 Sep 2010 07:08:05 +0000 (07:08 +0000)]
Silence an ambiguous else warning from GCC.

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

13 years agoFix compile errors.
Nick Lewycky [Thu, 2 Sep 2010 05:44:31 +0000 (05:44 +0000)]
Fix compile errors.

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

13 years agoAdded counters for PBQP reduction rules.
Lang Hames [Thu, 2 Sep 2010 05:37:52 +0000 (05:37 +0000)]
Added counters for PBQP reduction rules.

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

13 years agoReplace unpckl_undef and unpckh_undef matching with target specific opcodes
Bruno Cardoso Lopes [Thu, 2 Sep 2010 05:23:12 +0000 (05:23 +0000)]
Replace unpckl_undef and unpckh_undef matching with target specific opcodes

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

13 years agoMove condition out to prepare for more matching
Bruno Cardoso Lopes [Thu, 2 Sep 2010 04:20:26 +0000 (04:20 +0000)]
Move condition out to prepare for more matching

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

13 years agoRemove checking for isUNPCKL_v_undef_Mask, the specific node is already emitted for it
Bruno Cardoso Lopes [Thu, 2 Sep 2010 03:57:58 +0000 (03:57 +0000)]
Remove checking for isUNPCKL_v_undef_Mask, the specific node is already emitted for it

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

13 years agollvm::FindExecutable(): Retrieve the name with suffix.exe, if available.
NAKAMURA Takumi [Thu, 2 Sep 2010 03:46:04 +0000 (03:46 +0000)]
llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.

bugpoint uses it.

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

13 years agotest/loop-strength-reduce4: Add explicit triplet for Win32 host.
NAKAMURA Takumi [Thu, 2 Sep 2010 03:45:58 +0000 (03:45 +0000)]
test/loop-strength-reduce4: Add explicit triplet for Win32 host.

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

13 years agotest/twoaddr-coalesce: Do not use @main.
NAKAMURA Takumi [Thu, 2 Sep 2010 03:45:51 +0000 (03:45 +0000)]
test/twoaddr-coalesce: Do not use @main.
Win32 codegen emits implicit invoking __main into, to fail.

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

13 years agobecome more strict about when it's safe to use X86ISD::MOVLPS
Bruno Cardoso Lopes [Thu, 2 Sep 2010 02:35:51 +0000 (02:35 +0000)]
become more strict about when it's safe to use X86ISD::MOVLPS

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

13 years agoClang's -ccc-host-triple was ignoring the arch specifier on my triple,
Eric Christopher [Thu, 2 Sep 2010 02:30:46 +0000 (02:30 +0000)]
Clang's -ccc-host-triple was ignoring the arch specifier on my triple,
I don't need to implement this quite yet - and not for ConstantInt anyhow.

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

13 years agoThis should be TargetMaterializeConstant instead.
Eric Christopher [Thu, 2 Sep 2010 01:48:11 +0000 (01:48 +0000)]
This should be TargetMaterializeConstant instead.

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

13 years agoOne definition of isThumb is plenty, thanks.
Eric Christopher [Thu, 2 Sep 2010 01:39:14 +0000 (01:39 +0000)]
One definition of isThumb is plenty, thanks.

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

13 years agoRemove trailing whitespace
Jim Grosbach [Thu, 2 Sep 2010 01:02:06 +0000 (01:02 +0000)]
Remove trailing whitespace

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

13 years agoRework arm fast-isel load and store handling. Move offset computation
Eric Christopher [Thu, 2 Sep 2010 00:53:56 +0000 (00:53 +0000)]
Rework arm fast-isel load and store handling.  Move offset computation
into the "address selection" routine and handle constant materialization
for stores.

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

13 years agoAdd a bit of debug output for register scavenging
Jim Grosbach [Thu, 2 Sep 2010 00:51:37 +0000 (00:51 +0000)]
Add a bit of debug output for register scavenging

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

13 years agoupdates to make it clear that this applies to clang and other llvm subprojects.
Chris Lattner [Thu, 2 Sep 2010 00:09:17 +0000 (00:09 +0000)]
updates to make it clear that this applies to clang and other llvm subprojects.

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

13 years agotrivial cleanup
Jim Grosbach [Thu, 2 Sep 2010 00:02:26 +0000 (00:02 +0000)]
trivial cleanup

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

13 years agoSimplify the tGPR register class now that the register allocators know not
Jim Grosbach [Wed, 1 Sep 2010 23:50:23 +0000 (23:50 +0000)]
Simplify the tGPR register class now that the register allocators know not
to try to allocate reserved registers.

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

13 years agoRemove NEON vmull, vmlal, and vmlsl intrinsics, replacing them with multiply,
Bob Wilson [Wed, 1 Sep 2010 23:50:19 +0000 (23:50 +0000)]
Remove NEON vmull, vmlal, and vmlsl intrinsics, replacing them with multiply,
add, and subtract operations with zero-extended or sign-extended vectors.
Update tests.  Add auto-upgrade support for the old intrinsics.

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

13 years agoReword this comment. Don't mention outs(), as that's not what
Dan Gohman [Wed, 1 Sep 2010 23:33:02 +0000 (23:33 +0000)]
Reword this comment. Don't mention outs(), as that's not what
this code is actually testing for.

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

13 years agodeepen my MMX/SRoA hack to avoid hurting non-x86 codegen.
Chris Lattner [Wed, 1 Sep 2010 23:09:27 +0000 (23:09 +0000)]
deepen my MMX/SRoA hack to avoid hurting non-x86 codegen.

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

13 years agoRevert r112689, avoid those kind of checks cause they mess up with mmx
Bruno Cardoso Lopes [Wed, 1 Sep 2010 22:59:03 +0000 (22:59 +0000)]
Revert r112689, avoid those kind of checks cause they mess up with mmx

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

13 years agoTweak to ignoring reserved regs. The allocator was occasionally still looking
Jim Grosbach [Wed, 1 Sep 2010 22:48:34 +0000 (22:48 +0000)]
Tweak to ignoring reserved regs. The allocator was occasionally still looking
at them since they'd end up in the register weights list. Tell it to stop
doing that.

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

13 years agoRecommit with changes. Comment out palignr for the
Dale Johannesen [Wed, 1 Sep 2010 22:43:48 +0000 (22:43 +0000)]
Recommit with changes.  Comment out palignr for the
moment, as there's a testcase that uses it and expects it
to be subject to optimizations; we won't be doing that.
Some adjustments based on feedback from Bill.

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

13 years agoUsing target specific nodes for shuffle nodes makes the mask
Bruno Cardoso Lopes [Wed, 1 Sep 2010 22:33:20 +0000 (22:33 +0000)]
Using target specific nodes for shuffle nodes makes the mask
check more strict, breaking some cases not checked in the
testsuite, but also exposes some foldings not done before,
as this example:

  movaps  (%rdi), %xmm0
  movaps  (%rax), %xmm1
  movaps  %xmm0, %xmm2
  movss %xmm1, %xmm2
  shufps  $36, %xmm2, %xmm0

now is generated as:

  movaps  (%rdi), %xmm0
  movaps  %xmm0, %xmm1
  movlps  (%rax), %xmm1
  shufps  $36, %xmm1, %xmm0

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

13 years agoSome basic store support.
Eric Christopher [Wed, 1 Sep 2010 22:16:27 +0000 (22:16 +0000)]
Some basic store support.

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

13 years agoTeach RemoveCopyByCommutingDef to check all aliases, not just subregisters.
Jakob Stoklund Olesen [Wed, 1 Sep 2010 22:15:35 +0000 (22:15 +0000)]
Teach RemoveCopyByCommutingDef to check all aliases, not just subregisters.

This caused a miscompilation in WebKit where %RAX had conflicting defs when
RemoveCopyByCommutingDef was commuting a %EAX use.

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

13 years agoApparently only Darwin passes long double misaligned. Compensate.
Dale Johannesen [Wed, 1 Sep 2010 21:57:20 +0000 (21:57 +0000)]
Apparently only Darwin passes long double misaligned.  Compensate.

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

13 years agotidy up trailing whitespace and an 80 column violation.
Jim Grosbach [Wed, 1 Sep 2010 21:48:06 +0000 (21:48 +0000)]
tidy up trailing whitespace and an 80 column violation.

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

13 years agoFix loop unswitching's assumption that a code path which either
Dan Gohman [Wed, 1 Sep 2010 21:46:45 +0000 (21:46 +0000)]
Fix loop unswitching's assumption that a code path which either
infinite loops or exits will eventually exit. This fixes PR5373.

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

13 years agoRevert 112740, it broke some clang tests somehow...
Dale Johannesen [Wed, 1 Sep 2010 21:36:44 +0000 (21:36 +0000)]
Revert 112740, it broke some clang tests somehow...

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

13 years agocleanup per feedback. use a helper function for getting the first non-reserved
Jim Grosbach [Wed, 1 Sep 2010 21:34:41 +0000 (21:34 +0000)]
cleanup per feedback. use a helper function for getting the first non-reserved
physical register in a register class. Make sure to assert if the register
class is empty.

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

13 years agoThe register allocator shouldn't consider allocating reserved registers. PBQP version.
Jim Grosbach [Wed, 1 Sep 2010 21:23:03 +0000 (21:23 +0000)]
The register allocator shouldn't consider allocating reserved registers. PBQP version.

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

13 years agoThe register allocator shouldn't consider allocating reserved registers.
Jim Grosbach [Wed, 1 Sep 2010 21:04:27 +0000 (21:04 +0000)]
The register allocator shouldn't consider allocating reserved registers.
r112728 did this for fast regalloc.

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

13 years agoAdd a few more missing MMX operations. This should be it.
Dale Johannesen [Wed, 1 Sep 2010 21:03:03 +0000 (21:03 +0000)]
Add a few more missing MMX operations.  This should be it.

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

13 years agoupdate the tutorial to use CreateFAdd to create fp operations.
Chris Lattner [Wed, 1 Sep 2010 20:09:20 +0000 (20:09 +0000)]
update the tutorial to use CreateFAdd to create fp operations.

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

13 years agoThe register allocator shouldn't consider allocating reserved registers.
Jim Grosbach [Wed, 1 Sep 2010 19:28:41 +0000 (19:28 +0000)]
The register allocator shouldn't consider allocating reserved registers.

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

13 years agoDisable CorrelatedValuePropagation while I track down selfhost failures.
Owen Anderson [Wed, 1 Sep 2010 19:20:46 +0000 (19:20 +0000)]
Disable CorrelatedValuePropagation while I track down selfhost failures.

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

13 years agotidy up a few 80-column and trailing whitespace bits.
Jim Grosbach [Wed, 1 Sep 2010 19:16:29 +0000 (19:16 +0000)]
tidy up a few 80-column and trailing whitespace bits.

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

13 years agoThe output of opt -stats must be sent to stderr. Patch by NAKAMURA Takumi!
Bill Wendling [Wed, 1 Sep 2010 18:32:56 +0000 (18:32 +0000)]
The output of opt -stats must be sent to stderr. Patch by NAKAMURA Takumi!

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

13 years agoTentatively add correlated value propagation to the set of standard passes.
Owen Anderson [Wed, 1 Sep 2010 18:30:15 +0000 (18:30 +0000)]
Tentatively add correlated value propagation to the set of standard passes.

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

13 years agoJumpThreading keeps LazyValueInfo up to date, so we don't need to rerun it
Owen Anderson [Wed, 1 Sep 2010 18:27:22 +0000 (18:27 +0000)]
JumpThreading keeps LazyValueInfo up to date, so we don't need to rerun it
if we schedule another LVI-using pass afterwards.

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

13 years agoAdd some more load types in.
Eric Christopher [Wed, 1 Sep 2010 18:01:32 +0000 (18:01 +0000)]
Add some more load types in.

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

13 years agoSpeculatively revert 112699 and 112702, they seem to be causing
Eric Christopher [Wed, 1 Sep 2010 17:29:10 +0000 (17:29 +0000)]
Speculatively revert 112699 and 112702, they seem to be causing
self host errors on clang-x86-64.

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

13 years agohave the makefiles check the llvm-config error code instead of charging
Chris Lattner [Wed, 1 Sep 2010 16:11:17 +0000 (16:11 +0000)]
have the makefiles check the llvm-config error code instead of charging
on an producing weird link errors.  Patch by Yuri Gribov!

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

13 years agodead code patrol
Chris Lattner [Wed, 1 Sep 2010 16:06:39 +0000 (16:06 +0000)]
dead code patrol

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

13 years agozap dead code.
Chris Lattner [Wed, 1 Sep 2010 16:04:34 +0000 (16:04 +0000)]
zap dead code.

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

13 years agotemporarily revert r112664, it is causing a decoding conflict, and
Chris Lattner [Wed, 1 Sep 2010 16:00:50 +0000 (16:00 +0000)]
temporarily revert r112664, it is causing a decoding conflict, and
the testcases should be merged.

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

13 years agozap dead code.
Chris Lattner [Wed, 1 Sep 2010 15:44:05 +0000 (15:44 +0000)]
zap dead code.

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

13 years agoremove dead code.
Chris Lattner [Wed, 1 Sep 2010 15:39:31 +0000 (15:39 +0000)]
remove dead code.

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

13 years agoMake tool_output_file's raw_ostream instance a member variable instead
Dan Gohman [Wed, 1 Sep 2010 14:20:41 +0000 (14:20 +0000)]
Make tool_output_file's raw_ostream instance a member variable instead
of a base class.

This makes it possible to unregister the file from FilesToRemove when
the file is done. Also, this eliminates the need for
formatted_tool_output_file.

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

13 years agoAdd an interface for unregistering a file from the FilesToRemove list.
Dan Gohman [Wed, 1 Sep 2010 14:17:34 +0000 (14:17 +0000)]
Add an interface for unregistering a file from the FilesToRemove list.

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

13 years agoCOFF: Update tests to reflect changes in last commit.
Michael J. Spencer [Wed, 1 Sep 2010 14:15:31 +0000 (14:15 +0000)]
COFF: Update tests to reflect changes in last commit.

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

13 years agoCOFF: Fix incorrect SCT_COMPLEX_TYPE_SHIFT. Add a few constants.
Michael J. Spencer [Wed, 1 Sep 2010 14:09:36 +0000 (14:09 +0000)]
COFF: Fix incorrect SCT_COMPLEX_TYPE_SHIFT. Add a few constants.

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

13 years agoUse the SSAUpdator to turn calls to eh.exception that are not in a
Duncan Sands [Wed, 1 Sep 2010 14:07:47 +0000 (14:07 +0000)]
Use the SSAUpdator to turn calls to eh.exception that are not in a
landing pad into uses of registers rather than loads from a stack
slot.  Doesn't touch the 'orrible hack code - Bill needs to persuade
me harder :)

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

13 years agoMake the iterator form of erase return void, since it always succeeds,
Dan Gohman [Wed, 1 Sep 2010 14:00:35 +0000 (14:00 +0000)]
Make the iterator form of erase return void, since it always succeeds,
and since this is what std::map and std::set do.

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

13 years agoDefine LLVM_GLOBAL_VISIBILITY to be __declspec(dllexport) on
Duncan Sands [Wed, 1 Sep 2010 13:07:11 +0000 (13:07 +0000)]
Define LLVM_GLOBAL_VISIBILITY to be __declspec(dllexport) on
windows systems.

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

13 years agoIf PrototypeValue is erased in the middle of using the SSAUpdator
Duncan Sands [Wed, 1 Sep 2010 10:29:33 +0000 (10:29 +0000)]
If PrototypeValue is erased in the middle of using the SSAUpdator
then the SSAUpdator may access freed memory.  Instead, simply pass
in the type and name explicitly, which is all that was used anyway.

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

13 years agoAdd convenience class for working with eh.exception calls.
Duncan Sands [Wed, 1 Sep 2010 09:26:00 +0000 (09:26 +0000)]
Add convenience class for working with eh.exception calls.

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

13 years agoAttempt to fix buildbot.
Dale Johannesen [Wed, 1 Sep 2010 05:19:06 +0000 (05:19 +0000)]
Attempt to fix buildbot.

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

13 years agoadd a gross hack to work around a problem that Argiris reported
Chris Lattner [Wed, 1 Sep 2010 05:14:33 +0000 (05:14 +0000)]
add a gross hack to work around a problem that Argiris reported
on llvmdev: SRoA is introducing MMX datatypes like <1 x i64>,
which then cause random problems because the X86 backend is
producing mmx stuff without inserting proper emms calls.

In the short term, force off MMX datatypes.  In the long term,
the X86 backend should not select generic vector types to MMX
registers.  This is being worked on, but won't be done in time
for 2.8.  rdar://8380055

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

13 years agofilecheckize
Chris Lattner [Wed, 1 Sep 2010 05:10:14 +0000 (05:10 +0000)]
filecheckize

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

13 years agoUse movlps, movlpd, movss and movsd specific nodes instead of pattern matching with...
Bruno Cardoso Lopes [Wed, 1 Sep 2010 05:08:25 +0000 (05:08 +0000)]
Use movlps, movlpd, movss and movsd specific nodes instead of pattern matching with movlp pattern fragment

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

13 years agoRevert 112442 and 112440 until the compile time problems introduced
Dan Gohman [Wed, 1 Sep 2010 01:45:53 +0000 (01:45 +0000)]
Revert 112442 and 112440 until the compile time problems introduced
by 112440 are resolved.

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

13 years agominor change, simplify some logic
Bruno Cardoso Lopes [Wed, 1 Sep 2010 00:57:08 +0000 (00:57 +0000)]
minor change, simplify some logic

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

13 years agoMove some functions around so they can be used for some other to come function
Bruno Cardoso Lopes [Wed, 1 Sep 2010 00:51:36 +0000 (00:51 +0000)]
Move some functions around so they can be used for some other to come function

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

13 years agoAdd some MMX intrinsics that duplicate functionality
Dale Johannesen [Wed, 1 Sep 2010 00:40:09 +0000 (00:40 +0000)]
Add some MMX intrinsics that duplicate functionality
available in normal llvm operators.  We aren't going to
use those for MMX any more because it's unsafe for the
optimizers to synthesize new MMX instructions.

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

13 years agoUse absolute label for DW_AT_stmt_list if a target does not prefer offset here.
Devang Patel [Tue, 31 Aug 2010 23:50:19 +0000 (23:50 +0000)]
Use absolute label for DW_AT_stmt_list if a target does not prefer offset here.
This patch was developed on top of original patch by Artur Pietrek.

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

13 years agoTestcase for llvm checkin 112674.
Dale Johannesen [Tue, 31 Aug 2010 23:43:55 +0000 (23:43 +0000)]
Testcase for llvm checkin 112674.

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

13 years agoRemove noisy semicolon.
Benjamin Kramer [Tue, 31 Aug 2010 23:38:13 +0000 (23:38 +0000)]
Remove noisy semicolon.

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

13 years agolicm is wasting time hoisting constant foldable operations,
Chris Lattner [Tue, 31 Aug 2010 23:00:16 +0000 (23:00 +0000)]
licm is wasting time hoisting constant foldable operations,
instead of hoisting them, just fold them away.  This occurs in the
testcase for PR8041, for example.

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

13 years agoThis is the second of three patches to implement support for the .loc directive
Kevin Enderby [Tue, 31 Aug 2010 22:55:11 +0000 (22:55 +0000)]
This is the second of three patches to implement support for the .loc directive
and output the dwarf line number tables.  This takes the current loc info after
an instruction is assembled and saves the needed info into an object that has
vector and for each section.  These objects will be used for the final patch to
build and emit the encoded dwarf line number tables.  Again for now this is only
in the Mach-O streamer but at some point will move to a more generic place.

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

13 years agoReapply r112432, now that the real problem is addressed.
Dan Gohman [Tue, 31 Aug 2010 22:53:17 +0000 (22:53 +0000)]
Reapply r112432, now that the real problem is addressed.

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

13 years agoReapply r112433, now that the real problem is addressed.
Dan Gohman [Tue, 31 Aug 2010 22:52:12 +0000 (22:52 +0000)]
Reapply r112433, now that the real problem is addressed.

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

13 years agoRevert r110916. This patch is buggy because the code inside the
Dan Gohman [Tue, 31 Aug 2010 22:50:31 +0000 (22:50 +0000)]
Revert r110916. This patch is buggy because the code inside the
inner loop doesn't update all the variables in the outer loop.

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

13 years agoWe have a chance for an optimization. Consider this code:
Bill Wendling [Tue, 31 Aug 2010 22:41:22 +0000 (22:41 +0000)]
We have a chance for an optimization. Consider this code:

int x(int t) {
  if (t & 256)
    return -26;
  return 0;
}

We generate this:

     tst.w   r0, #256
     mvn     r0, #25
     it      eq
     moveq   r0, #0

while gcc generates this:

     ands    r0, r0, #256
     it      ne
     mvnne   r0, #25
     bx      lr

Scandalous really!

During ISel time, we can look for this particular pattern. One where we have a
"MOVCC" that uses the flag off of a CMPZ that itself is comparing an AND
instruction to 0. Something like this (greatly simplified):

  %r0 = ISD::AND ...
  ARMISD::CMPZ %r0, 0         @ sets [CPSR]
  %r0 = ARMISD::MOVCC 0, -26  @ reads [CPSR]

All we have to do is convert the "ISD::AND" into an "ARM::ANDS" that sets [CPSR]
when it's zero. The zero value will all ready be in the %r0 register and we only
need to change it if the AND wasn't zero. Easy!

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

13 years agoSome fixes for NetBSD
Anton Korobeynikov [Tue, 31 Aug 2010 22:38:00 +0000 (22:38 +0000)]
Some fixes for NetBSD

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

13 years agoUse x86 specific MOVSLDUP node, add more patterns to match it and remove useless...
Bruno Cardoso Lopes [Tue, 31 Aug 2010 22:35:05 +0000 (22:35 +0000)]
Use x86 specific MOVSLDUP node, add more patterns to match it and remove useless load nodes

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

13 years agoReapply r112623. Included additional check for unused byval argument.
Devang Patel [Tue, 31 Aug 2010 22:22:42 +0000 (22:22 +0000)]
Reapply r112623. Included additional check for unused byval argument.

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

13 years agoUse x86 specific MOVSHDUP node and add more patterns to match it
Bruno Cardoso Lopes [Tue, 31 Aug 2010 22:22:11 +0000 (22:22 +0000)]
Use x86 specific MOVSHDUP node and add more patterns to match it

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

13 years agoAnd ANDS pattern to match the t2ANDS pattern.
Bill Wendling [Tue, 31 Aug 2010 22:05:37 +0000 (22:05 +0000)]
And ANDS pattern to match the t2ANDS pattern.

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

13 years agoStack slot access methods are in TargetInstrInfo.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 22:01:07 +0000 (22:01 +0000)]
Stack slot access methods are in TargetInstrInfo.

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

13 years agoComment typo.
Dale Johannesen [Tue, 31 Aug 2010 21:53:15 +0000 (21:53 +0000)]
Comment typo.

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

13 years agoMake %EFLAGS unallocatable.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 21:51:07 +0000 (21:51 +0000)]
Make %EFLAGS unallocatable.

No CCR virtual registers should exist, and %EFLAGS is used in ways that can
surprise RegAllocFast.

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

13 years agoTrack liveness of unallocatable, unreserved registers in machine DCE.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 21:51:05 +0000 (21:51 +0000)]
Track liveness of unallocatable, unreserved registers in machine DCE.

Reserved registers are unpredictable, and are treated as always live by machine
DCE.

Allocatable registers are never reserved, and can be used for virtual registers.

Unreserved, unallocatable registers can not be used for virtual registers, but
otherwise behave like a normal allocatable register. Most targets only have
the flag register in this set.

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

13 years agoUse MOVHLPS node instead of matching using movhlps and movhlps_undef pattern fragments
Bruno Cardoso Lopes [Tue, 31 Aug 2010 21:38:49 +0000 (21:38 +0000)]
Use MOVHLPS node instead of matching using movhlps and movhlps_undef pattern fragments

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

13 years agotidy up
Chris Lattner [Tue, 31 Aug 2010 21:21:25 +0000 (21:21 +0000)]
tidy up

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

13 years agoUse MOVLHPS and MOVHLPS x86 nodes whenever possible. Also remove some useless nodes
Bruno Cardoso Lopes [Tue, 31 Aug 2010 21:15:21 +0000 (21:15 +0000)]
Use MOVLHPS and MOVHLPS x86 nodes whenever possible. Also remove some useless nodes

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

13 years agoRevert r112432. It appears to be exposing a problem in the emacs build.
Dan Gohman [Tue, 31 Aug 2010 20:58:44 +0000 (20:58 +0000)]
Revert r112432. It appears to be exposing a problem in the emacs build.

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

13 years agoMerge 2010-08-31-InfiniteRecursion.ll into crash.ll.
Owen Anderson [Tue, 31 Aug 2010 20:27:17 +0000 (20:27 +0000)]
Merge 2010-08-31-InfiniteRecursion.ll into crash.ll.

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

13 years agoMore cleanups of my JumpThreading transforms, including extracting some duplicated...
Owen Anderson [Tue, 31 Aug 2010 20:26:04 +0000 (20:26 +0000)]
More cleanups of my JumpThreading transforms, including extracting some duplicated code into a helper function.

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

13 years agoIgnore unallocatable registers in RegAllocFast.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 19:54:25 +0000 (19:54 +0000)]
Ignore unallocatable registers in RegAllocFast.

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

13 years agoRevert r112623. It is causing self host build failures.
Devang Patel [Tue, 31 Aug 2010 19:41:03 +0000 (19:41 +0000)]
Revert r112623. It is causing self host build failures.

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

13 years agoUpdate the Ada instructions to LLVM 2.7 (from LLVM 2.5).
Duncan Sands [Tue, 31 Aug 2010 19:40:21 +0000 (19:40 +0000)]
Update the Ada instructions to LLVM 2.7 (from LLVM 2.5).

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

13 years agoAdd an RAII helper to make cleanup of the RecursionSet more fool-proof.
Owen Anderson [Tue, 31 Aug 2010 19:24:27 +0000 (19:24 +0000)]
Add an RAII helper to make cleanup of the RecursionSet more fool-proof.

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

13 years agoOnly try to clean up the current block if we changed that block already.
Owen Anderson [Tue, 31 Aug 2010 18:55:52 +0000 (18:55 +0000)]
Only try to clean up the current block if we changed that block already.

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

13 years agoSP relative offsets need to be adjusted by the local allocation size when
Jim Grosbach [Tue, 31 Aug 2010 18:52:31 +0000 (18:52 +0000)]
SP relative offsets need to be adjusted by the local allocation size when
determining if they're likely to be in range of the SP when resolving
frame references.

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

13 years agoRemember byval argument's frame index during argument lowering and use this info...
Devang Patel [Tue, 31 Aug 2010 18:50:09 +0000 (18:50 +0000)]
Remember byval argument's frame index during argument lowering and use this info to emit debug info.
Fixes Radar 8367011.

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