oota-llvm.git
17 years agoVarious random cleanups, add two accessors to DomTreeNode: getDFSNumIn/getDFSNumOut
Chris Lattner [Mon, 6 Aug 2007 06:15:43 +0000 (06:15 +0000)]
Various random cleanups, add two accessors to DomTreeNode: getDFSNumIn/getDFSNumOut

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

17 years agoUpdate links to the command guide generated documentation.
Reid Spencer [Sun, 5 Aug 2007 23:43:44 +0000 (23:43 +0000)]
Update links to the command guide generated documentation.

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

17 years agoFix minor doxygen nits.
Reid Spencer [Sun, 5 Aug 2007 20:06:04 +0000 (20:06 +0000)]
Fix minor doxygen nits.

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

17 years agoComment out configuration tags not supported by doxygen 1.3.9
Reid Spencer [Sun, 5 Aug 2007 19:51:03 +0000 (19:51 +0000)]
Comment out configuration tags not supported by doxygen 1.3.9

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

17 years agoDocument a missing parameter.
Reid Spencer [Sun, 5 Aug 2007 19:36:39 +0000 (19:36 +0000)]
Document a missing parameter.

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

17 years agoSilence some warnings from doxygen about @param argument name not matching the
Reid Spencer [Sun, 5 Aug 2007 19:35:22 +0000 (19:35 +0000)]
Silence some warnings from doxygen about @param argument name not matching the
actual argument name of the documented function.

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

17 years agoEscape some escapes that confuse doxygen.
Reid Spencer [Sun, 5 Aug 2007 19:33:11 +0000 (19:33 +0000)]
Escape some escapes that confuse doxygen.

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

17 years agoFix a doxygen directive.
Reid Spencer [Sun, 5 Aug 2007 19:27:01 +0000 (19:27 +0000)]
Fix a doxygen directive.

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

17 years agoLong double patch 4 of N: initial x87 implementation.
Dale Johannesen [Sun, 5 Aug 2007 18:49:15 +0000 (18:49 +0000)]
Long double patch 4 of N: initial x87 implementation.
Lots of problems yet but some simple things work.

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

17 years agoallow this to pass on ppc hosts.
Chris Lattner [Sun, 5 Aug 2007 18:48:18 +0000 (18:48 +0000)]
allow this to pass on ppc hosts.

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

17 years agoshorten this name
Chris Lattner [Sun, 5 Aug 2007 18:45:33 +0000 (18:45 +0000)]
shorten this name

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

17 years agoat the end of instcombine, explicitly clear WorklistMap.
Chris Lattner [Sun, 5 Aug 2007 08:47:58 +0000 (08:47 +0000)]
at the end of instcombine, explicitly clear WorklistMap.
This shrinks it down to something small.  On the testcase
from PR1432, this speeds up instcombine from 0.7959s to 0.5000s,
(59%)

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

17 years agoFix a bug in DenseMap::clear, where we never reset a tombstone
Chris Lattner [Sun, 5 Aug 2007 08:43:36 +0000 (08:43 +0000)]
Fix a bug in DenseMap::clear, where we never reset a tombstone
to EmptyKey.

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

17 years agoUpgrade BasicAliasAnalysis::getModRefBehavior to not call Value::getName,
Chris Lattner [Sun, 5 Aug 2007 07:50:06 +0000 (07:50 +0000)]
Upgrade BasicAliasAnalysis::getModRefBehavior to not call Value::getName,
which dynamically allocates the string result.  This speeds up dse on the
testcase from PR1432 from 0.3781s to 0.1804s (2.1x).

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

17 years agoWhen clearing a SmallPtrSet, if the set had a huge capacity, but the
Chris Lattner [Sun, 5 Aug 2007 07:32:14 +0000 (07:32 +0000)]
When clearing a SmallPtrSet, if the set had a huge capacity, but the
contents of the set were small, deallocate and shrink the set.  This
avoids having us to memset as much data, significantly speeding up
some pathological cases.  For example, this speeds up the verifier
from 0.3899s to 0.0763 (5.1x) on the testcase from PR1432 in a
release build.

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

17 years agoFix an iterator invalidation bug I induced.
Chris Lattner [Sun, 5 Aug 2007 00:24:30 +0000 (00:24 +0000)]
Fix an iterator invalidation bug I induced.

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

17 years agoSwitch some std::sets to SmallPtrSet. This speeds up
Chris Lattner [Sun, 5 Aug 2007 00:15:57 +0000 (00:15 +0000)]
Switch some std::sets to SmallPtrSet.  This speeds up
domtree by 10% and postdomtree by 17%

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

17 years agoSwitch DomTreeNode::assignDFSNumber from using a std::set to using
Chris Lattner [Sun, 5 Aug 2007 00:10:08 +0000 (00:10 +0000)]
Switch DomTreeNode::assignDFSNumber from using a std::set to using
a smallptrset.  This speeds up domtree by about 15% and postdomtree by 20%.

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

17 years agoSwitch the internal "Info" map from an std::map to a DenseMap. This
Chris Lattner [Sun, 5 Aug 2007 00:02:00 +0000 (00:02 +0000)]
Switch the internal "Info" map from an std::map to a DenseMap.  This
speeds up idom by about 45% and postidom by about 33%.

Some extra precautions must be taken not to invalidate densemap iterators.

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

17 years agoswitch the DomTreeNodes and IDoms maps in idom/postidom to a
Chris Lattner [Sat, 4 Aug 2007 23:48:07 +0000 (23:48 +0000)]
switch the DomTreeNodes and IDoms maps in idom/postidom to a
DenseMap instead of an std::map.  This speeds up postdomtree
by about 25% and domtree by about 23%.  It also speeds up clients,
for example, domfrontier by 11%, mem2reg by 4% and ADCE by 6%.

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

17 years agorewrite the code used to construct pruned SSA form with the IDF method.
Chris Lattner [Sat, 4 Aug 2007 22:50:14 +0000 (22:50 +0000)]
rewrite the code used to construct pruned SSA form with the IDF method.
In the old way, we computed and inserted phi nodes for the whole IDF of
the definitions of the alloca, then computed which ones were dead and
removed them.

In the new method, we first compute the region where the value is live,
and use that information to only insert phi nodes that are live.  This
eliminates the need to compute liveness later, and stops the algorithm
from inserting a bunch of phis which it then later removes.

This speeds up the testcase in PR1432 from 2.00s to 0.15s (14x) in a
release build and 6.84s->0.50s (14x) in a debug build.

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

17 years agoFactor out a whole bunch of code into it's own method.
Chris Lattner [Sat, 4 Aug 2007 21:14:29 +0000 (21:14 +0000)]
Factor out a whole bunch of code into it's own method.

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

17 years agoUse getNumPreds(BB) instead of computing them manually. This is a very small but
Chris Lattner [Sat, 4 Aug 2007 21:06:15 +0000 (21:06 +0000)]
Use getNumPreds(BB) instead of computing them manually. This is a very small but
measurable speedup.

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

17 years agoChange the rename pass to be "tail recursive", only adding N-1 successors
Chris Lattner [Sat, 4 Aug 2007 20:40:27 +0000 (20:40 +0000)]
Change the rename pass to be "tail recursive", only adding N-1 successors
to the worklist, and handling the last one with a 'tail call'.  This speeds
up PR1432 from 2.0578s to 2.0012s (2.8%)

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

17 years agocache computation of #preds for a BB. This speeds up
Chris Lattner [Sat, 4 Aug 2007 20:24:50 +0000 (20:24 +0000)]
cache computation of #preds for a BB.  This speeds up
mem2reg from 2.0742->2.0522s on PR1432.

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

17 years agoreserve operand space for phi nodes when we insert them.
Chris Lattner [Sat, 4 Aug 2007 20:14:34 +0000 (20:14 +0000)]
reserve operand space for phi nodes when we insert them.

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

17 years agouse continue to avoid nesting, no functionality change.
Chris Lattner [Sat, 4 Aug 2007 20:07:06 +0000 (20:07 +0000)]
use continue to avoid nesting, no functionality change.

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

17 years agoPromoting allocas with the 'single store' fastpath is
Chris Lattner [Sat, 4 Aug 2007 20:03:23 +0000 (20:03 +0000)]
Promoting allocas with the 'single store' fastpath is
faster than with the 'local to a block' fastpath.  This speeds
up PR1432 from 2.1232 to 2.0686s (2.6%)

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

17 years agoWhen PromoteLocallyUsedAllocas promoted allocas, it didn't remember
Chris Lattner [Sat, 4 Aug 2007 20:01:43 +0000 (20:01 +0000)]
When PromoteLocallyUsedAllocas promoted allocas, it didn't remember
to increment NumLocalPromoted, and didn't actually delete the
dead alloca, leading to an extra iteration of mem2reg.

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

17 years agostd::map -> DenseMap
Chris Lattner [Sat, 4 Aug 2007 19:52:20 +0000 (19:52 +0000)]
std::map -> DenseMap

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

17 years agoClean up comments, fix up some confusing code logic.
Nick Lewycky [Sat, 4 Aug 2007 18:45:32 +0000 (18:45 +0000)]
Clean up comments, fix up some confusing code logic.
Predsimplify fails llvm-gcc bootstrap.

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

17 years agofix a logic bug where we wouldn't promote single store allocas if the
Chris Lattner [Sat, 4 Aug 2007 02:45:02 +0000 (02:45 +0000)]
fix a logic bug where we wouldn't promote single store allocas if the
stored value was a non-instruction value.  Doh.

This increase the # single store allocas from 8982 to 9026, and
speeds up mem2reg on the testcase in PR1432 from 2.17 to 2.13s.

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

17 years agoWhen we do the single-store optimization, delete both the store
Chris Lattner [Sat, 4 Aug 2007 02:38:38 +0000 (02:38 +0000)]
When we do the single-store optimization, delete both the store
and the alloca so they don't get reprocessed.

This speeds up PR1432 from 2.20s to 2.17s.

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

17 years agoThree improvements:
Chris Lattner [Sat, 4 Aug 2007 02:32:22 +0000 (02:32 +0000)]
Three improvements:
  1. Check for revisiting a block before checking domination, which is faster.
  2. If the stored value isn't an instruction, we don't have to check for domination.
  3. If we have a value used in the same block more than once, make sure to remove the
     block from the UsingBlocks vector.  Not doing so forces us to go through the slow
     path for the alloca.

The combination of these improvements increases the number of allocas on the fastpath
from 8935 to 8982 on PR1432.  This speeds it up from 2.90s to 2.20s (31%)

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

17 years agoswitch from using a std::set to using a SmallPtrSet. This speeds up the
Chris Lattner [Sat, 4 Aug 2007 02:21:22 +0000 (02:21 +0000)]
switch from using a std::set to using a SmallPtrSet.  This speeds up the
testcase in PR1432 from 6.33s to 2.90s (2.22x)

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

17 years agoIn mem2reg, when handling the single-store case, make sure to remove
Chris Lattner [Sat, 4 Aug 2007 02:15:24 +0000 (02:15 +0000)]
In mem2reg, when handling the single-store case, make sure to remove
a using block from the list if we handle it.  Not doing this caused us
to not be able to promote (with the fast path) allocas which have uses (whoops).

This increases the # allocas hitting this fastpath from 4042 to 8935 on the
testcase in PR1432, speeding up mem2reg by 2.6x

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

17 years agoRegenerating.
Chandler Carruth [Sat, 4 Aug 2007 01:56:21 +0000 (01:56 +0000)]
Regenerating.

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

17 years agoThis is the patch to provide clean intrinsic function overloading support in LLVM...
Chandler Carruth [Sat, 4 Aug 2007 01:51:18 +0000 (01:51 +0000)]
This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.

This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

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

17 years agosplit rewriting of single-store allocas into its own
Chris Lattner [Sat, 4 Aug 2007 01:47:41 +0000 (01:47 +0000)]
split rewriting of single-store allocas into its own
method.

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

17 years agorefactor some code to shrink PromoteMem2Reg::run a bit
Chris Lattner [Sat, 4 Aug 2007 01:41:18 +0000 (01:41 +0000)]
refactor some code to shrink PromoteMem2Reg::run a bit

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

17 years agoadd a typedef, no other change.
Chris Lattner [Sat, 4 Aug 2007 01:19:38 +0000 (01:19 +0000)]
add a typedef, no other change.

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

17 years agoavoid an unneeded vector copy. This speeds up mem2reg on the testcase
Chris Lattner [Sat, 4 Aug 2007 01:07:49 +0000 (01:07 +0000)]
avoid an unneeded vector copy.  This speeds up mem2reg on the testcase
in PR1432 by 6%

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

17 years agomake RenamePassWorkList a local var instead of an ivar.
Chris Lattner [Sat, 4 Aug 2007 01:04:40 +0000 (01:04 +0000)]
make RenamePassWorkList a local var instead of an ivar.

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

17 years agoMake x86 long double alignment 32 for everything but
Dale Johannesen [Fri, 3 Aug 2007 22:46:15 +0000 (22:46 +0000)]
Make x86 long double alignment 32 for everything but
Darwin (which makes size within a struct==96)

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

17 years agolong double patch 3 of N. Add to MVT.
Dale Johannesen [Fri, 3 Aug 2007 20:51:37 +0000 (20:51 +0000)]
long double patch 3 of N.  Add to MVT.

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

17 years agolong double patch 2 of N. Handle it in TargetData.
Dale Johannesen [Fri, 3 Aug 2007 20:20:50 +0000 (20:20 +0000)]
long double patch 2 of N.  Handle it in TargetData.
(I've tried to get the info right for all targets,
but I'm not expert on all of them - check yours.)

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

17 years agoFix a subtle miscompilation. This allows 197.parser to be compiled correctly.
Owen Anderson [Fri, 3 Aug 2007 19:59:35 +0000 (19:59 +0000)]
Fix a subtle miscompilation.  This allows 197.parser to be compiled correctly.

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

17 years agoFix a subtle iterator invalidation bug in a recursive algorithm.
Owen Anderson [Fri, 3 Aug 2007 11:03:26 +0000 (11:03 +0000)]
Fix a subtle iterator invalidation bug in a recursive algorithm.

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

17 years agoPrepare for "core" website.
Reid Spencer [Fri, 3 Aug 2007 05:43:35 +0000 (05:43 +0000)]
Prepare for "core" website.

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

17 years agoLong double, part 1 of N. Support in IR.
Dale Johannesen [Fri, 3 Aug 2007 01:03:46 +0000 (01:03 +0000)]
Long double, part 1 of N.  Support in IR.

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

17 years agoadd an observation
Chris Lattner [Fri, 3 Aug 2007 00:17:42 +0000 (00:17 +0000)]
add an observation

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

17 years agoFix an accidental commit.
Chris Lattner [Thu, 2 Aug 2007 21:33:36 +0000 (21:33 +0000)]
Fix an accidental commit.

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

17 years agoMore explicit keywords.
Dan Gohman [Thu, 2 Aug 2007 21:21:54 +0000 (21:21 +0000)]
More explicit keywords.

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

17 years agoFix the alignment requirements of several unpck and shuf instructions.
Dan Gohman [Thu, 2 Aug 2007 21:17:01 +0000 (21:17 +0000)]
Fix the alignment requirements of several unpck and shuf instructions.
Generalize isPSHUFDMask and add a unary SHUFPD pattern so that SHUFPD's
memory operand alignment can be tested as well, with a fix to avoid
breaking MMX's use of isPSHUFDMask.

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

17 years agoFix pastos in vector arithmetic intrinsics.
Dan Gohman [Thu, 2 Aug 2007 21:06:40 +0000 (21:06 +0000)]
Fix pastos in vector arithmetic intrinsics.

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

17 years agoFix 80 col. violations.
Owen Anderson [Thu, 2 Aug 2007 18:20:52 +0000 (18:20 +0000)]
Fix 80 col. violations.

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

17 years agoFix 80 col. violations.
Owen Anderson [Thu, 2 Aug 2007 18:16:06 +0000 (18:16 +0000)]
Fix 80 col. violations.

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

17 years agoFix 80 col. violations.
Owen Anderson [Thu, 2 Aug 2007 18:11:11 +0000 (18:11 +0000)]
Fix 80 col. violations.

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

17 years agodon't redefine a parameter
Chris Lattner [Thu, 2 Aug 2007 18:08:16 +0000 (18:08 +0000)]
don't redefine a parameter

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

17 years agoFix a bug that was causing several miscompilations on SPEC.
Owen Anderson [Thu, 2 Aug 2007 17:56:05 +0000 (17:56 +0000)]
Fix a bug that was causing several miscompilations on SPEC.

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

17 years agoImplement review feedback.
Christopher Lamb [Thu, 2 Aug 2007 17:52:00 +0000 (17:52 +0000)]
Implement review feedback.

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

17 years agoI don't have time to restore this functionality right now.
Chris Lattner [Thu, 2 Aug 2007 17:43:39 +0000 (17:43 +0000)]
I don't have time to restore this functionality right now.

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

17 years agoReplacing a cast with another one does not reduce the number of
Chris Lattner [Thu, 2 Aug 2007 17:23:38 +0000 (17:23 +0000)]
Replacing a cast with another one does not reduce the number of
casts in the input.

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

17 years agoReduced testcase for PR1594
Chris Lattner [Thu, 2 Aug 2007 17:11:24 +0000 (17:11 +0000)]
Reduced testcase for PR1594

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

17 years agoDisable an xform that causes an infinite loop. This fixes PR1594
Chris Lattner [Thu, 2 Aug 2007 16:56:32 +0000 (16:56 +0000)]
Disable an xform that causes an infinite loop.  This fixes PR1594

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

17 years agowrap some long lines. Major offenders that are left include
Chris Lattner [Thu, 2 Aug 2007 16:53:43 +0000 (16:53 +0000)]
wrap some long lines.  Major offenders that are left include
gvn, gvnpre, dse, and predsimplify.  To see these, use:

  make check-line-length

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

17 years agoUpdate dominator info for the middle blocks created while spliting
Devang Patel [Thu, 2 Aug 2007 15:25:57 +0000 (15:25 +0000)]
Update dominator info for the middle blocks created while spliting
exit edge to preserve LCSSA.

Fix dominance frontier update during loop unswitch. This fixes PR 1589, again

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

17 years agoMark the SSE and MMX load instructions that
Dan Gohman [Thu, 2 Aug 2007 14:27:55 +0000 (14:27 +0000)]
Mark the SSE and MMX load instructions that
X86InstrInfo::isReallyTriviallyReMaterializable knows how to handle
with the isReMaterializable flag so that it is given a chance to handle
them. Without hoisting constant-pool loads from loops this isn't very
visible, though it does keep CodeGen/X86/constant-pool-remat-0.ll from
making a copy of the constant pool on the stack.

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

17 years agoEnhance instcombine to be more aggressive about folding casts of
Chris Lattner [Thu, 2 Aug 2007 06:11:14 +0000 (06:11 +0000)]
Enhance instcombine to be more aggressive about folding casts of
operations of casts.  This implements InstCombine/zext-fold.ll

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

17 years agoFix bug spotted by Chris.
Anders Carlsson [Thu, 2 Aug 2007 06:05:19 +0000 (06:05 +0000)]
Fix bug spotted by Chris.

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

17 years agoAdd extend and extOrTrunc methods that do sign or zero extension depending on whether...
Anders Carlsson [Thu, 2 Aug 2007 06:00:13 +0000 (06:00 +0000)]
Add extend and extOrTrunc methods that do sign or zero extension depending on whether the integer is signed or not

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

17 years agoSwitch some multiplication instructions over to the new scheme for testing.
Evan Cheng [Thu, 2 Aug 2007 05:48:35 +0000 (05:48 +0000)]
Switch some multiplication instructions over to the new scheme for testing.

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

17 years agoDo not emit copies for physical register output if it's not used.
Evan Cheng [Thu, 2 Aug 2007 05:29:38 +0000 (05:29 +0000)]
Do not emit copies for physical register output if it's not used.

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

17 years agoFix test.
Evan Cheng [Thu, 2 Aug 2007 05:04:16 +0000 (05:04 +0000)]
Fix test.

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

17 years agoFix PR1575 and test/Transforms/CondProp/2007-08-01-InvalidRead.ll
Chris Lattner [Thu, 2 Aug 2007 04:47:05 +0000 (04:47 +0000)]
Fix PR1575 and test/Transforms/CondProp/2007-08-01-InvalidRead.ll

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

17 years agoAdjust for new CallInst constructor interface.
Reid Spencer [Thu, 2 Aug 2007 03:30:26 +0000 (03:30 +0000)]
Adjust for new CallInst constructor interface.
This fixes test/Feature/llvm2cpp.ll

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

17 years agoStyle police: Expand the tabs to spaces!
Scott Michel [Thu, 2 Aug 2007 02:22:46 +0000 (02:22 +0000)]
Style police: Expand the tabs to spaces!

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

17 years agoTeach BasicAA about noalias parameter attributes, but do it correctly this time.
Christopher Lamb [Thu, 2 Aug 2007 01:18:14 +0000 (01:18 +0000)]
Teach BasicAA about noalias parameter attributes, but do it correctly this time.

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

17 years agoInstead of adding copyfromreg's to handle physical definitions. Now isel can
Evan Cheng [Thu, 2 Aug 2007 00:28:15 +0000 (00:28 +0000)]
Instead of adding copyfromreg's to handle physical definitions. Now isel can
simply specify them as results and let scheduledag handle them. That
is, instead of
SDOperand Flag = DAG.getTargetNode(Opc, MVT::i32, MVT::Flag, ...)
SDOperand Result = DAG.getCopyFromReg(Chain, X86::EAX, MVT::i32, Flag)

Just write:
SDOperand Result = DAG.getTargetNode(Opc, MVT::i32, MVT::i32, ...)

And let scheduledag emit the move from X86::EAX to a virtual register.

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

17 years agoAdded TargetInstrDescriptor::numDefs - num of results.
Evan Cheng [Thu, 2 Aug 2007 00:20:17 +0000 (00:20 +0000)]
Added TargetInstrDescriptor::numDefs - num of results.

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

17 years agoCan't handle offset and scale if rip-relative addressing is to be used.
Evan Cheng [Wed, 1 Aug 2007 23:46:47 +0000 (23:46 +0000)]
Can't handle offset and scale if rip-relative addressing is to be used.

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

17 years agoMac OS X X86-64 low 4G address not available.
Evan Cheng [Wed, 1 Aug 2007 23:46:10 +0000 (23:46 +0000)]
Mac OS X X86-64 low 4G address not available.

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

17 years agoMac OS X X86-64 low 4G address not available.
Evan Cheng [Wed, 1 Aug 2007 23:45:51 +0000 (23:45 +0000)]
Mac OS X X86-64 low 4G address not available.

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

17 years agoUndo previous check-in.
Devang Patel [Wed, 1 Aug 2007 23:24:50 +0000 (23:24 +0000)]
Undo previous check-in.

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

17 years agoSome out operands were incorrectly specified as input operands.
Evan Cheng [Wed, 1 Aug 2007 23:07:38 +0000 (23:07 +0000)]
Some out operands were incorrectly specified as input operands.

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

17 years agoMake sure these tests pass for the right reasons (verifier error, rather than
Reid Spencer [Wed, 1 Aug 2007 23:07:36 +0000 (23:07 +0000)]
Make sure these tests pass for the right reasons (verifier error, rather than
failure to assemble).

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

17 years agoUpdate dominator info for the middle blocks created while spliting
Devang Patel [Wed, 1 Aug 2007 22:23:50 +0000 (22:23 +0000)]
Update dominator info for the middle blocks created while spliting
exit edge to preserve LCSSA.

Fix dominance frontier update during loop unswitch. This fixes PR 1589.

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

17 years agoMake non-local memdep not be recursive, and fix a bug on 403.gcc that this exposed.
Owen Anderson [Wed, 1 Aug 2007 22:01:54 +0000 (22:01 +0000)]
Make non-local memdep not be recursive, and fix a bug on 403.gcc that this exposed.

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

17 years agoMissing Requires.
Evan Cheng [Wed, 1 Aug 2007 21:42:24 +0000 (21:42 +0000)]
Missing Requires.

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

17 years agoNew test. Bogus implicit-def prevented a copy from being coalesced.
Evan Cheng [Wed, 1 Aug 2007 20:26:40 +0000 (20:26 +0000)]
New test. Bogus implicit-def prevented a copy from being coalesced.

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

17 years agoBe more precise.
Evan Cheng [Wed, 1 Aug 2007 20:22:37 +0000 (20:22 +0000)]
Be more precise.

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

17 years agoBugs: missing partial uses and redundant partial defs.
Evan Cheng [Wed, 1 Aug 2007 20:18:21 +0000 (20:18 +0000)]
Bugs: missing partial uses and redundant partial defs.

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

17 years agoAdd a test for the load/store alignment.
Lauro Ramos Venancio [Wed, 1 Aug 2007 20:07:59 +0000 (20:07 +0000)]
Add a test for the load/store alignment.

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

17 years agoExpand unaligned loads/stores when the target doesn't support them. (PR1548)
Lauro Ramos Venancio [Wed, 1 Aug 2007 19:34:21 +0000 (19:34 +0000)]
Expand unaligned loads/stores when the target doesn't support them. (PR1548)

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

17 years agoClean up C++ restrict test cases and add a test for restrict qualified methods.
Christopher Lamb [Wed, 1 Aug 2007 18:48:29 +0000 (18:48 +0000)]
Clean up C++ restrict test cases and add a test for restrict qualified methods.

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

17 years agothese tests aren't xfailed.
Chris Lattner [Wed, 1 Aug 2007 18:37:44 +0000 (18:37 +0000)]
these tests aren't xfailed.

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

17 years agowe're now handling this right :)
Chris Lattner [Wed, 1 Aug 2007 17:10:30 +0000 (17:10 +0000)]
we're now handling this right :)

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

17 years agoForgot to update these files for the FastDSE changes.
Owen Anderson [Wed, 1 Aug 2007 16:53:51 +0000 (16:53 +0000)]
Forgot to update these files for the FastDSE changes.

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

17 years agoMore explicit keywords.
Dan Gohman [Wed, 1 Aug 2007 15:32:29 +0000 (15:32 +0000)]
More explicit keywords.

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

17 years agoChange a .size directive to use a tab instead of a space, for consistency.
Dan Gohman [Wed, 1 Aug 2007 14:42:30 +0000 (14:42 +0000)]
Change a .size directive to use a tab instead of a space, for consistency.

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