Commit Graph

2602 Commits

Author SHA1 Message Date
Chris Lattner 5b3057bb82 Fix bug: test/Regression/CBackend/2002-05-16-NameCollide.ll by tracking
which global variables would have name collisions if they were not mangled,
and use this info to mangle them iff they would collide.

llvm-svn: 2639
2002-05-17 04:55:35 +00:00
Chris Lattner ee451dea68 New C backend testcases with first testcase
llvm-svn: 2638
2002-05-17 04:53:52 +00:00
Chris Lattner 7bc532dded * Make debug output conditional on #define
* Add optimization to rank computation to not recursively search when
  unneccesary.
* More agressively negate expressions to open reassociation opportunities.
* Linearize (A+B)+(C+D) into ((A+B)+C)+D

llvm-svn: 2637
2002-05-16 04:37:07 +00:00
Chris Lattner 3557bd055d Add tests of redundant load elimination
llvm-svn: 2636
2002-05-16 01:03:12 +00:00
Chris Lattner 168582d1da New testcases for sub/neg reassociation
llvm-svn: 2635
2002-05-16 00:56:59 +00:00
Chris Lattner a5d9be115a Fix testcase
llvm-svn: 2634
2002-05-16 00:56:36 +00:00
Chris Lattner d88f3e8d97 New testcases to ensure sub's are maximally reassociable
llvm-svn: 2633
2002-05-15 21:59:31 +00:00
Chris Lattner 8f143b68e0 Testcase to ensure trees structures are correctly linearized
llvm-svn: 2632
2002-05-15 21:56:51 +00:00
Chris Lattner 0743fbd763 Test to ensure sub -> neg promotion is working and why.
llvm-svn: 2631
2002-05-15 20:30:48 +00:00
Chris Lattner 4b474fc56f New testcase
llvm-svn: 2630
2002-05-15 17:22:01 +00:00
Chris Lattner cd9837d32e * Fix bug: test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll
By making sure to consider binary expressions identical if their operands
are backwards, but swappable.

llvm-svn: 2629
2002-05-14 19:57:25 +00:00
Chris Lattner a64388a25f New testcase
llvm-svn: 2628
2002-05-14 19:56:14 +00:00
Chris Lattner 170ed7b6a3 Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
llvm-svn: 2627
2002-05-14 16:44:07 +00:00
Chris Lattner 86498988e0 New testcase for bug
llvm-svn: 2626
2002-05-14 16:40:43 +00:00
Chris Lattner c914944a61 Run another local value numbering phase after redundancy elimination
llvm-svn: 2625
2002-05-14 16:23:14 +00:00
Chris Lattner 408dbdb9ad Avoid emitting a useless comment for a basic block with no uses (which
often happens for the entry basic block of a function)

llvm-svn: 2624
2002-05-14 16:02:05 +00:00
Chris Lattner 053c0939e3 Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-TouchDeletedInst.ll
"This testcase caused instcombine to fail because it got the same instruction on
it's worklist more than once (which is ok), but then deleted the instruction.
Since the inst stayed on the worklist, as soon as it came back up to be
processed, bad things happened, and opt asserted."

llvm-svn: 2623
2002-05-14 15:24:07 +00:00
Chris Lattner 9e36792753 New testcase
llvm-svn: 2622
2002-05-14 15:22:50 +00:00
Chris Lattner a3c3456e7f Fix a major source of "type unsafety", where a cast is neccesary, but can
be put either before or after a load.  We chose to cast the value loaded
instead of the pointer to load from.

Fixes bug: test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll

llvm-svn: 2621
2002-05-14 05:23:45 +00:00
Chris Lattner d38ddb1164 Implement elimination of loads
llvm-svn: 2620
2002-05-14 05:02:40 +00:00
Chris Lattner 3262f9406b Invoke inst has side effects!
llvm-svn: 2619
2002-05-14 04:20:25 +00:00
Chris Lattner e00d826c7a New file
llvm-svn: 2618
2002-05-13 22:19:50 +00:00
Chris Lattner 7ab51787ca Trivial cleanups
llvm-svn: 2617
2002-05-13 22:04:46 +00:00
Chris Lattner da6743e60c Add method to check to see if two _Instructions_ dominate each other
llvm-svn: 2616
2002-05-13 22:03:16 +00:00
Chris Lattner 6ec05f551c Initial checkin of LICM pass
llvm-svn: 2615
2002-05-10 22:44:58 +00:00
Chris Lattner 81525db280 expose LICM pass
llvm-svn: 2614
2002-05-10 22:44:37 +00:00
Chris Lattner 47d923c2e0 Add LICM pass to compiler
llvm-svn: 2613
2002-05-10 22:44:31 +00:00
Chris Lattner b9f60c24d9 Add prototype for LICM pass
llvm-svn: 2612
2002-05-10 22:44:16 +00:00
Chris Lattner 8d206636c2 Add testcase for when there is no loop header
llvm-svn: 2611
2002-05-10 22:43:26 +00:00
Chris Lattner ccab0fe417 A basic test that LICM is working
llvm-svn: 2610
2002-05-10 22:27:49 +00:00
Chris Lattner a31883eb2c Run LICM tests
llvm-svn: 2609
2002-05-10 22:21:38 +00:00
Chris Lattner 8e0ed6ea2c run LICM tests
llvm-svn: 2608
2002-05-10 22:21:25 +00:00
Chris Lattner d5696e7125 Make sure to call the derived visit versions from the ranged iterator.
llvm-svn: 2607
2002-05-10 22:21:05 +00:00
Chris Lattner e7ba5fb065 We actually need this code for the release build to prevent link errors,
un#ifdef it.

llvm-svn: 2606
2002-05-10 18:54:35 +00:00
Chris Lattner 94b4c5fe83 Add explicit abort so optimized build knows that the function does not return
llvm-svn: 2605
2002-05-10 18:53:55 +00:00
Chris Lattner e5bf51fc4f Add an explicit abort so that the optimized build knows the function does
not return.

llvm-svn: 2604
2002-05-10 18:53:21 +00:00
Chris Lattner 198d5eb1c4 * Allow a profile'd code build to be done with a simple 'make ENABLE_PROFILING=1'
* Only build tags for include, lib, and tools, not tests
* Turn on verbose output from bison to get information about shift/reduce
  conficts (why isn't this the default??)

llvm-svn: 2603
2002-05-10 18:51:54 +00:00
Chris Lattner 6205c268e0 Expose the lowerallocs pass
llvm-svn: 2602
2002-05-10 15:43:07 +00:00
Chris Lattner 0b18c1d64e Add support for printing out statistics information when -stats is added to
the command line

llvm-svn: 2601
2002-05-10 15:38:35 +00:00
Chris Lattner bad1b4dfce Fix some bugs, straighten stuff out, more work needs to be done.
llvm-svn: 2600
2002-05-10 15:37:35 +00:00
Chris Lattner 529ad64148 Initial checkin of Statistic class
llvm-svn: 2599
2002-05-10 15:36:56 +00:00
Chris Lattner 9eb0052548 Initial checkin of Statistic class.
llvm-svn: 2598
2002-05-10 15:36:46 +00:00
Chris Lattner da2eddd5c4 * Add support for the -stats command line option to report how much is changed
* Make cast-of-self-ty DCE the dead cast instruction immediately instead of
  waiting for it to be DCE'd by another sweep over the function.  This speeds
  this up noticably.

llvm-svn: 2597
2002-05-10 15:29:25 +00:00
Chris Lattner 2d032846d0 New testcase
llvm-svn: 2596
2002-05-10 15:14:54 +00:00
Chris Lattner b621decdad remove deprecated getInstType() method
llvm-svn: 2595
2002-05-10 13:28:47 +00:00
Chris Lattner 35cc0d2027 Expose the pi node insertion pass.
llvm-svn: 2594
2002-05-10 05:41:49 +00:00
Chris Lattner 014ee634ce Initial checkin of the PiNodeInsertion pass
llvm-svn: 2593
2002-05-10 05:41:34 +00:00
Chris Lattner f3d6e41d29 Add prototype for the PiNodeInserter pass
llvm-svn: 2592
2002-05-10 05:40:37 +00:00
Chris Lattner 3b13b58ef0 Test the Pi node inserter
llvm-svn: 2591
2002-05-10 05:38:39 +00:00
Chris Lattner 6a4fa1c8b5 Initial checkin of testcases for Pi node inserter
llvm-svn: 2590
2002-05-10 05:38:18 +00:00