Dan Gohman [Tue, 26 Jun 2007 16:19:08 +0000 (16:19 +0000)]
Replace ?: with if statements, for clarity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37735
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Jun 2007 15:20:04 +0000 (15:20 +0000)]
Simplify the expression for MVT::isExtendedValueType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37733
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Jun 2007 15:16:27 +0000 (15:16 +0000)]
Simplify the expression for TargetLowering::isTypeLegal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37732
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Jun 2007 15:14:48 +0000 (15:14 +0000)]
Use utostr from StringExtras.h instead of ostringstream from <sstream>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37731
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Jun 2007 14:28:59 +0000 (14:28 +0000)]
Renumber the SimpleValueType values to fill in the hole left by
removing MVT::Vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37730
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Jun 2007 00:48:07 +0000 (00:48 +0000)]
Revert the earlier change that removed the M_REMATERIALIZABLE machine
instruction flag, and use the flag along with a virtual member function
hook for targets to override if there are instructions that are only
trivially rematerializable with specific operands (i.e. constant pool
loads).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37728
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Jun 2007 00:43:18 +0000 (00:43 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37727
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Jun 2007 00:38:49 +0000 (00:38 +0000)]
Add a convenince member function for appending strings to a module's
module-level asm string data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37726
91177308-0d34-0410-b5e6-
96231b3b80d8
Duraid Madina [Tue, 26 Jun 2007 00:21:58 +0000 (00:21 +0000)]
tidy this file up a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37725
91177308-0d34-0410-b5e6-
96231b3b80d8
Duraid Madina [Mon, 25 Jun 2007 23:46:54 +0000 (23:46 +0000)]
A bunch of fixes to the BigBlock allocator improve compile-time by ~20%
and code quality by ~2% on my tests.
A big thank you to Roman Levenstein for this patch! See
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20070618/050717.html
for more details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37724
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jun 2007 21:50:09 +0000 (21:50 +0000)]
fix Transforms/Inline/2007-06-25-WeakInline.ll by not inlining functions
with weak linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37723
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jun 2007 21:49:53 +0000 (21:49 +0000)]
new testcase, the inliner shouldn't inline this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37722
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 25 Jun 2007 18:25:31 +0000 (18:25 +0000)]
Use the built-in postorder iterators rather than computing a postorder walk by hand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37721
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 25 Jun 2007 16:45:54 +0000 (16:45 +0000)]
Fix PR1525:
Use a better determinator for identifying constant array initializers that
are or are not zero terminated and generate code appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37720
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 25 Jun 2007 16:23:39 +0000 (16:23 +0000)]
Generalize MVT::ValueType and associated functions to be able to represent
extended vector types. Remove the special SDNode opcodes used for pre-legalize
vector operations, and the special MVT::Vector type used with them. Adjust
lowering and legalize to work with the normal SDNode kinds instead, and to
use the normal MVT functions to work with vector types instead of using the
two special operands that the pre-legalize nodes held.
This allows pre-legalize and post-legalize DAGs, and the code that operates
on them, to be more consistent. Pre-legalize vector operators can be handled
more consistently with scalar operators. And, -view-dag-combine1-dags and
-view-legalize-dags now look prettier for vector code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37719
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 25 Jun 2007 15:44:19 +0000 (15:44 +0000)]
Make minor adjustments to whitespace and comments to reduce differences
between SSE1 instructions and their respective SSE2 analogues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37718
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 25 Jun 2007 15:19:03 +0000 (15:19 +0000)]
Fix loadv2i32 to be loadv4i32, though it isn't actually used anywhere yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37717
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 25 Jun 2007 15:11:25 +0000 (15:11 +0000)]
Say AT&T instead of Intel in the comments for AT&T support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37716
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 25 Jun 2007 07:12:14 +0000 (07:12 +0000)]
Provide hook for alloca on VCPP. Patch by Scott Graham
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37715
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 25 Jun 2007 05:41:12 +0000 (05:41 +0000)]
1) Fix an issue with non-deterministic iteration order in phi_translate
2) Remove some maximal-set computing code that is no longer used.
3) Use a post-order CFG traversal to compute ANTIC_IN instead of a postdom traversal.
This causes the ANTIC_IN calculation to converge much faster. Thanks to Daniel Berlin for suggesting this.
With this patch, the time to optimize 403.gcc decreased from 17.5s to 7.5s, and Anton's huge
testcase decreased from 62 minutes to 38 seconds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37714
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 24 Jun 2007 20:14:22 +0000 (20:14 +0000)]
Fix value ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37713
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 24 Jun 2007 08:42:24 +0000 (08:42 +0000)]
Fix a silly mistake that was causing failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37712
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 24 Jun 2007 08:17:41 +0000 (08:17 +0000)]
Rename variables to expose the fact that this test is failing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37711
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 24 Jun 2007 04:40:16 +0000 (04:40 +0000)]
Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37710
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 24 Jun 2007 04:36:20 +0000 (04:36 +0000)]
Remove use of ETForest. Also cleaned up issues around unreachable basic
blocks, and optimizing within one basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37709
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jun 2007 21:31:16 +0000 (21:31 +0000)]
Rework topo_sort so eliminate some behavior that scaled terribly. This reduces the time to optimize 403.gcc from 18.2s to 17.5s,
and has an even larger effect on larger testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37708
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jun 2007 18:27:04 +0000 (18:27 +0000)]
Perform fewer set insertions while calculating ANTIC_IN. This reduces the amount of time to optimize 403.gcc from 21.9s to 18.2s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37707
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jun 2007 17:04:40 +0000 (17:04 +0000)]
Remove some code that I was using for collecting performance information that should not have been committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37706
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jun 2007 16:59:54 +0000 (16:59 +0000)]
Fix the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37705
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Jun 2007 14:59:07 +0000 (14:59 +0000)]
Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from
TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37704
91177308-0d34-0410-b5e6-
96231b3b80d8
Duraid Madina [Fri, 22 Jun 2007 08:27:12 +0000 (08:27 +0000)]
check in the BigBlock local register allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37703
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jun 2007 03:14:03 +0000 (03:14 +0000)]
Avoid excessive calls to find_leader when calculating AVAIL_OUT. This reduces the time to optimize 403.gcc from 23.5s to 21.9s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37702
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 22 Jun 2007 01:35:51 +0000 (01:35 +0000)]
std::set is really really terrible. Switch to SmallPtrSet to reduce compile time. For Duraid's example. The overall isel time is reduced from 0.6255 sec to 0.1876 sec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37701
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 22 Jun 2007 00:54:56 +0000 (00:54 +0000)]
Quote complex names for Darwin X86 and ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37700
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jun 2007 00:43:22 +0000 (00:43 +0000)]
Reserve space in vectors before topologically sorting into them. This improves the time to optimize 403.gcc from 28s to 23.5s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37699
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jun 2007 00:20:30 +0000 (00:20 +0000)]
Make a bunch of optimizations for compile time to GVNPRE, including smarter set unions, deferring blocks rather than computing maximal sets, and smarter use of sets. With these enhancements, the time to optimize 273.perlbmk goes from 5.3s to 2.7s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37698
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jun 2007 00:11:18 +0000 (00:11 +0000)]
Fix a bug in SmallPtrSet that was causing GVNPRE to enter an infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37697
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Jun 2007 23:23:32 +0000 (23:23 +0000)]
Two changes:
1. Make SmallPtrSet::erase faster in the small case by replacing a memmove
with a pointer copy.
2. Fix a bug where the null terminator at the end of the array in the small
case was not copied
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37696
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Jun 2007 22:29:02 +0000 (22:29 +0000)]
CallGraphSCCPass manager may require other passes.
Use schedulePass() to accomodate these requirement instead of directly
assigning a manager to new CallGraph PassManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37695
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Jun 2007 21:25:36 +0000 (21:25 +0000)]
Have internal df_iterator's use SmallPtrSet instead of std::set. This provides compile time speedups to any pass using df_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37694
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 21 Jun 2007 18:22:42 +0000 (18:22 +0000)]
Fix tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37693
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Jun 2007 18:11:19 +0000 (18:11 +0000)]
Significantly improve the documentation of the instcombine divide/compare
transformation. Also, keep track of which end of the integer interval overflows
occur on. This fixes Transforms/InstCombine/2007-06-21-DivCompareMiscomp.ll
and rdar://
5278853, a miscompilation of perl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37692
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Jun 2007 18:09:25 +0000 (18:09 +0000)]
new testcase miscompiled by instcombine, reduced from perl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37691
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Jun 2007 17:57:53 +0000 (17:57 +0000)]
Change lots of sets from std::set to SmallPtrSet. This reduces the time required to optimize 253.perlbmk from 10.9s to 5.3s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37690
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Jun 2007 17:23:45 +0000 (17:23 +0000)]
Move code to update dominator information after basic block is split
from LoopSimplify.cpp to Dominator.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37689
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Jun 2007 14:48:26 +0000 (14:48 +0000)]
Tidy up ValueType names in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37688
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Jun 2007 14:42:22 +0000 (14:42 +0000)]
Rename TargetLowering::getNumElements and friends to
TargetLowering::getNumRegisters and similar, to avoid confusion with
the actual number of elements for vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37687
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 21 Jun 2007 07:40:00 +0000 (07:40 +0000)]
New tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37686
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 21 Jun 2007 07:39:16 +0000 (07:39 +0000)]
Xforms:
(add (select cc, 0, c), x) -> (select cc, x, (add, x, c))
(sub x, (select cc, 0, c)) -> (select cc, x, (sub, x, c))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37685
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Jun 2007 01:59:05 +0000 (01:59 +0000)]
Eliminate a redundant check. This speeds up optimization of 253.perlbmk from 13.5 seconds to 10.9 seconds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37683
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Jun 2007 00:19:05 +0000 (00:19 +0000)]
Comment-ize the functions in GVNPRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37681
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 20 Jun 2007 23:46:26 +0000 (23:46 +0000)]
refactor a bunch of code out of visitICmpInstWithInstAndIntCst into its own
routine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37679
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 20 Jun 2007 22:10:02 +0000 (22:10 +0000)]
Split runOnFunction into many smaller functions. This make it easier to get accurate performance analysis of GVNPRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37678
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Wed, 20 Jun 2007 20:46:37 +0000 (20:46 +0000)]
Modify deleting global variable with an even easier way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37676
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 20 Jun 2007 18:51:14 +0000 (18:51 +0000)]
Update AnalysisGroup documentation to document restriction that allows
only one ImmutablePass in a group.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37675
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Wed, 20 Jun 2007 18:33:15 +0000 (18:33 +0000)]
Add blurb on deleting global variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37674
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 20 Jun 2007 18:30:20 +0000 (18:30 +0000)]
Make GVNPRE accurate report whether it modified the function or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37673
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 20 Jun 2007 18:26:15 +0000 (18:26 +0000)]
Added some if-conversion tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37672
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 20 Jun 2007 00:43:33 +0000 (00:43 +0000)]
Get rid of an unneeded helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37670
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jun 2007 23:55:02 +0000 (23:55 +0000)]
Be more conservative of duplicating blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37669
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 19 Jun 2007 23:23:54 +0000 (23:23 +0000)]
Use a DenseMap instead of an std::map for the value numbering. This reduces the time to optimize lencod on a PPC Debug build from ~300s to ~140s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37668
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 19 Jun 2007 23:07:16 +0000 (23:07 +0000)]
Make dependsOnInvoke much more specific in what it tests, which in turn make it much faster to run. This reduces the time to optimize lencondwith a debug build on PPC from ~450s to ~300s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37667
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Tue, 19 Jun 2007 22:31:52 +0000 (22:31 +0000)]
Moved Inliner.h to include/llvm/Transforms/IPO/InlinerPass.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37666
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Tue, 19 Jun 2007 22:29:50 +0000 (22:29 +0000)]
Inliner pass header file was moved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37665
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Tue, 19 Jun 2007 22:29:02 +0000 (22:29 +0000)]
Move inliner pass header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37664
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jun 2007 21:45:13 +0000 (21:45 +0000)]
Avoid if-converting simple block that ends with unconditional branch or fallthrough unless it branches / falls to the 'false' block. Not profitable, may end up increasing code size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37660
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jun 2007 21:05:09 +0000 (21:05 +0000)]
Allow predicated immediate ARM to ARM calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37659
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 16:46:48 +0000 (16:46 +0000)]
Fix pr1448
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37658
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jun 2007 14:28:31 +0000 (14:28 +0000)]
Rename ScalarEvolution::deleteInstructionFromRecords to
deleteValueFromRecords and loosen the types to all it to accept
Value* instead of just Instruction*, since this is what
ScalarEvolution uses internally anyway. This allows more flexibility
for future uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37657
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jun 2007 14:13:56 +0000 (14:13 +0000)]
Pass a SelectionDAG into SDNode::dump everywhere it's used, in prepration
for needing the DAG node to print pre-legalize extended value types, and
to get better debug messages with target-specific nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37656
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 19 Jun 2007 07:35:36 +0000 (07:35 +0000)]
Handle constants in phi nodes properly. This fixes test/Transforms/GVNPRE/2007-06-18-ConstantInPhi.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37655
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 06:40:46 +0000 (06:40 +0000)]
silence warning when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37654
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 19 Jun 2007 05:55:01 +0000 (05:55 +0000)]
Testcase for instances where a constant only occurs as an operand to a phi node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37653
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 05:52:36 +0000 (05:52 +0000)]
don't use binutils 2.17
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37652
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 05:47:49 +0000 (05:47 +0000)]
document and hide two options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37651
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 05:46:06 +0000 (05:46 +0000)]
describe an argument, hide it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37650
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 05:43:49 +0000 (05:43 +0000)]
silence a bogus warning Duraid ran into.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37649
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 19 Jun 2007 05:41:22 +0000 (05:41 +0000)]
Add a new testcase for memory corruption issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37648
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 19 Jun 2007 05:37:32 +0000 (05:37 +0000)]
Be careful to erase values from all of the appropriate sets when they're not needed anymore. This fixes a few more memory-related issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37647
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 19 Jun 2007 04:32:55 +0000 (04:32 +0000)]
Remember to clear the maximal sets between functions.
Thanks to Nicholas for valgrinding this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37646
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 19 Jun 2007 03:31:41 +0000 (03:31 +0000)]
Refactor GVNPRE to use a much smart method of uniquing value sets, and centralize a lot of the value numbering information. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37645
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jun 2007 01:48:05 +0000 (01:48 +0000)]
Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37644
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jun 2007 01:26:51 +0000 (01:26 +0000)]
Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37643
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jun 2007 01:21:41 +0000 (01:21 +0000)]
Replace CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37642
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 00:13:10 +0000 (00:13 +0000)]
If a function is vararg, never pass inreg arguments in registers. Thanks to
Anton for half of this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37641
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 00:11:09 +0000 (00:11 +0000)]
add isVarArg to CCState
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 00:10:25 +0000 (00:10 +0000)]
add isvararg tracking to CCState
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37639
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jun 2007 00:08:42 +0000 (00:08 +0000)]
testcase for PR1513
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37638
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jun 2007 00:06:08 +0000 (00:06 +0000)]
New test case: identity operation of RHS / LHS of a VECTOR_SHUFFLE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37637
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jun 2007 00:02:56 +0000 (00:02 +0000)]
Look for VECTOR_SHUFFLE that's identity operation on either LHS or RHS. This can happen before DAGCombiner catches it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37636
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Mon, 18 Jun 2007 23:42:37 +0000 (23:42 +0000)]
Update docs for llvm.var.annotation intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37635
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 18 Jun 2007 22:44:57 +0000 (22:44 +0000)]
Fix some fragile code wrt CFG edge updating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37634
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 18 Jun 2007 22:43:58 +0000 (22:43 +0000)]
Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37633
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Mon, 18 Jun 2007 22:23:39 +0000 (22:23 +0000)]
Modify annotate intrinsic to take 2 additional args: file and line number.
Fix up Annotate attribute test case.
Fix DebugFilename.c test case to look for right file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37632
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jun 2007 21:50:49 +0000 (21:50 +0000)]
add helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37631
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 18 Jun 2007 21:32:29 +0000 (21:32 +0000)]
Fix quotes in debug messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37630
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jun 2007 21:28:10 +0000 (21:28 +0000)]
make ComputeTopDownOrdering significantly faster and use less stack space
by making it non-recursive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37629
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 18 Jun 2007 19:30:09 +0000 (19:30 +0000)]
In SCEVAddExpr::get, skip over any cast operands before looking for nested
add operands after constant operands. The recent change to recognize
sign-extend expressions caused this to be exposed more often.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37628
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 18 Jun 2007 17:13:29 +0000 (17:13 +0000)]
Make BasicAliasAnalysis correctly register itself. Patch by Devang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37627
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 18 Jun 2007 15:30:16 +0000 (15:30 +0000)]
Make chain dependencies blue, in addition to being dashed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37626
91177308-0d34-0410-b5e6-
96231b3b80d8