Commit Graph

33286 Commits

Author SHA1 Message Date
Anton Korobeynikov ec9038bc69 Provide hook for alloca on VCPP. Patch by Scott Graham
llvm-svn: 37715
2007-06-25 07:12:14 +00:00
Owen Anderson 191eb06352 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.

llvm-svn: 37714
2007-06-25 05:41:12 +00:00
Nick Lewycky 8735f44104 Fix value ranges.
llvm-svn: 37713
2007-06-24 20:14:22 +00:00
Owen Anderson 7fb6da8e4d Fix a silly mistake that was causing failures.
llvm-svn: 37712
2007-06-24 08:42:24 +00:00
Owen Anderson bfd1673366 Rename variables to expose the fact that this test is failing.
llvm-svn: 37711
2007-06-24 08:17:41 +00:00
Nick Lewycky 0f986fdbfa Remove tabs.
llvm-svn: 37710
2007-06-24 04:40:16 +00:00
Nick Lewycky 26e25d340e Remove use of ETForest. Also cleaned up issues around unreachable basic
blocks, and optimizing within one basic block.

llvm-svn: 37709
2007-06-24 04:36:20 +00:00
Owen Anderson 49409f6501 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.

llvm-svn: 37708
2007-06-22 21:31:16 +00:00
Owen Anderson 21a1131565 Perform fewer set insertions while calculating ANTIC_IN. This reduces the amount of time to optimize 403.gcc from 21.9s to 18.2s.
llvm-svn: 37707
2007-06-22 18:27:04 +00:00
Owen Anderson 92c7b22e1a Remove some code that I was using for collecting performance information that should not have been committed.
llvm-svn: 37706
2007-06-22 17:04:40 +00:00
Owen Anderson 0c550df9d2 Fix the build.
llvm-svn: 37705
2007-06-22 16:59:54 +00:00
Dan Gohman 309d3d51b3 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.

llvm-svn: 37704
2007-06-22 14:59:07 +00:00
Duraid Madina 81a752aa95 check in the BigBlock local register allocator
llvm-svn: 37703
2007-06-22 08:27:12 +00:00
Owen Anderson f6e21871ad Avoid excessive calls to find_leader when calculating AVAIL_OUT. This reduces the time to optimize 403.gcc from 23.5s to 21.9s.
llvm-svn: 37702
2007-06-22 03:14:03 +00:00
Evan Cheng e3c4419953 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.
llvm-svn: 37701
2007-06-22 01:35:51 +00:00
Dale Johannesen 485531ea9b Quote complex names for Darwin X86 and ARM.
llvm-svn: 37700
2007-06-22 00:54:56 +00:00
Owen Anderson d50a29d613 Reserve space in vectors before topologically sorting into them. This improves the time to optimize 403.gcc from 28s to 23.5s.
llvm-svn: 37699
2007-06-22 00:43:22 +00:00
Owen Anderson 28a2d449fa 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.
llvm-svn: 37698
2007-06-22 00:20:30 +00:00
Owen Anderson 6d7b6f1ab8 Fix a bug in SmallPtrSet that was causing GVNPRE to enter an infinite loop.
llvm-svn: 37697
2007-06-22 00:11:18 +00:00
Chris Lattner 836e8f3f39 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

llvm-svn: 37696
2007-06-21 23:23:32 +00:00
Devang Patel 703de8fea8 CallGraphSCCPass manager may require other passes.
Use schedulePass() to accomodate these requirement instead of directly
assigning a manager to new CallGraph PassManager.

llvm-svn: 37695
2007-06-21 22:29:02 +00:00
Owen Anderson 7c3a5513f7 Have internal df_iterator's use SmallPtrSet instead of std::set. This provides compile time speedups to any pass using df_iterator.
llvm-svn: 37694
2007-06-21 21:25:36 +00:00
Evan Cheng e15ea75168 Fix tests.
llvm-svn: 37693
2007-06-21 18:22:42 +00:00
Chris Lattner fb032b176b 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.

llvm-svn: 37692
2007-06-21 18:11:19 +00:00
Chris Lattner 181ebd6f88 new testcase miscompiled by instcombine, reduced from perl
llvm-svn: 37691
2007-06-21 18:09:25 +00:00
Owen Anderson 2ff912bf33 Change lots of sets from std::set to SmallPtrSet. This reduces the time required to optimize 253.perlbmk from 10.9s to 5.3s.
llvm-svn: 37690
2007-06-21 17:57:53 +00:00
Devang Patel d5258a23a5 Move code to update dominator information after basic block is split
from LoopSimplify.cpp to Dominator.cpp

llvm-svn: 37689
2007-06-21 17:23:45 +00:00
Dan Gohman 8e8d34b220 Tidy up ValueType names in comments.
llvm-svn: 37688
2007-06-21 14:48:26 +00:00
Dan Gohman 04deef3a49 Rename TargetLowering::getNumElements and friends to
TargetLowering::getNumRegisters and similar, to avoid confusion with
the actual number of elements for vector types.

llvm-svn: 37687
2007-06-21 14:42:22 +00:00
Evan Cheng 5fcb5a5c74 New tests.
llvm-svn: 37686
2007-06-21 07:40:00 +00:00
Evan Cheng aa5f5d960d 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))

llvm-svn: 37685
2007-06-21 07:39:16 +00:00
Owen Anderson 27876a3ff9 Eliminate a redundant check. This speeds up optimization of 253.perlbmk from 13.5 seconds to 10.9 seconds.
llvm-svn: 37683
2007-06-21 01:59:05 +00:00
Owen Anderson fd5683ad7a Comment-ize the functions in GVNPRE.
llvm-svn: 37681
2007-06-21 00:19:05 +00:00
Chris Lattner 3bbec59e8b refactor a bunch of code out of visitICmpInstWithInstAndIntCst into its own
routine.

llvm-svn: 37679
2007-06-20 23:46:26 +00:00
Owen Anderson 06c1e585c9 Split runOnFunction into many smaller functions. This make it easier to get accurate performance analysis of GVNPRE.
llvm-svn: 37678
2007-06-20 22:10:02 +00:00
Tanya Lattner 872bf1bdc3 Modify deleting global variable with an even easier way.
llvm-svn: 37676
2007-06-20 20:46:37 +00:00
Devang Patel eeff910244 Update AnalysisGroup documentation to document restriction that allows
only one ImmutablePass in a group.

llvm-svn: 37675
2007-06-20 18:51:14 +00:00
Tanya Lattner 1a08cf311e Add blurb on deleting global variables.
llvm-svn: 37674
2007-06-20 18:33:15 +00:00
Owen Anderson b0714bb7bb Make GVNPRE accurate report whether it modified the function or not.
llvm-svn: 37673
2007-06-20 18:30:20 +00:00
Evan Cheng 85010166a6 Added some if-conversion tests.
llvm-svn: 37672
2007-06-20 18:26:15 +00:00
Owen Anderson 7b0fb44ca9 Get rid of an unneeded helper function.
llvm-svn: 37670
2007-06-20 00:43:33 +00:00
Evan Cheng 77d61e6f6d Be more conservative of duplicating blocks.
llvm-svn: 37669
2007-06-19 23:55:02 +00:00
Owen Anderson 1ad2c10215 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.
llvm-svn: 37668
2007-06-19 23:23:54 +00:00
Owen Anderson 2320d430bd 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.
llvm-svn: 37667
2007-06-19 23:07:16 +00:00
Tanya Lattner c655839d71 Moved Inliner.h to include/llvm/Transforms/IPO/InlinerPass.h
llvm-svn: 37666
2007-06-19 22:31:52 +00:00
Tanya Lattner ab11b1c702 Inliner pass header file was moved.
llvm-svn: 37665
2007-06-19 22:29:50 +00:00
Tanya Lattner 39be2d896d Move inliner pass header file.
llvm-svn: 37664
2007-06-19 22:29:02 +00:00
Evan Cheng a955c02c9b 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.
llvm-svn: 37660
2007-06-19 21:45:13 +00:00
Evan Cheng c3c949b473 Allow predicated immediate ARM to ARM calls.
llvm-svn: 37659
2007-06-19 21:05:09 +00:00
Chris Lattner cd74c3ea7c Fix pr1448
llvm-svn: 37658
2007-06-19 16:46:48 +00:00