summaryrefslogtreecommitdiff
path: root/test/Transforms/LoopUnswitch
Commit message (Collapse)AuthorAge
* TBAA: remove !tbaa from testing cases if not used.Manman Ren2013-04-30
| | | | | | | | This will make it easier to turn on struct-path aware TBAA since the metadata format will change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180796 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the test moves from 176733. Use "REQUIRES: asserts" instead.Jan Wen Voung2013-03-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176873 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable statistics on Release builds and move tests that depend on -stats.Jan Wen Voung2013-03-08
| | | | | | | | | | | | | | | | | Summary: Statistics are still available in Release+Asserts (any +Asserts builds), and stats can also be turned on with LLVM_ENABLE_STATS. Move some of the FastISel stats that were moved under DEBUG() back out of DEBUG(), since stats are disabled across the board now. Many tests depend on grepping "-stats" output. Move those into a orig_dir/Stats/. so that they can be marked as unsupported when building without statistics. Differential Revision: http://llvm-reviews.chandlerc.com/D486 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176733 91177308-0d34-0410-b5e6-96231b3b80d8
* Use references to attribute groups on the call/invoke instructions.Bill Wendling2013-02-22
| | | | | | | | Listing all of the attributes for the callee of a call/invoke instruction is way too much and makes the IR unreadable. Use references to attributes instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175877 91177308-0d34-0410-b5e6-96231b3b80d8
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2012-12-30
| | | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171250 91177308-0d34-0410-b5e6-96231b3b80d8
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2012-12-30
| | | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171246 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new attribute, 'noduplicate'. If a function contains a noduplicate ↵James Molloy2012-12-20
| | | | | | | | | | call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call. Similarly inlining of the function is inhibited, if that would duplicate the call (in particular inlining is still allowed when there is only one callsite and the function has internal linkage). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170704 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix tests that didn't test anything.Benjamin Kramer2012-09-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164686 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the uses of '|&' to use '2>&1 |' instead, which works on oldChandler Carruth2012-07-02
| | | | | | | | | | versions of Bash. In addition, I can back out the change to the lit built-in shell test runner to support this. This should fix the majority of fallout on Darwin, but I suspect there will be a few straggling issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159544 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the new LoopInfo algorithm by default.Andrew Trick2012-06-26
| | | | | | | | | | | | | | | | | | | | | | | | The primary advantage is that loop optimizations will be applied in a stable order. This helps debugging and unit test creation. It is also a better overall implementation without pathologically bad performance on deep functions. On large functions (llvm-stress --size=200000 | opt -loops) Before: 0.1263s After: 0.0225s On deep functions (after tweaking llvm-stress, thanks Nadav): Before: 0.2281s After: 0.0227s See r158790 for more comments. The loop tree is now consistently generated in forward order, but loop passes are applied in reverse order over the program. If we have a loop optimization that prefers forward order, that can easily be achieved by adding a different type of LoopPassManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159183 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not pass an invalid domtree to SimplifyInstruction fromPeter Collingbourne2012-05-20
| | | | | | LoopUnswitch. Fixes PR12887. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157140 91177308-0d34-0410-b5e6-96231b3b80d8
* Second attempt at PR12573:Bill Wendling2012-04-30
| | | | | | | | | | | | Allow the "SplitCriticalEdge" function to split the edge to a landing pad. If the pass is *sure* that it thinks it knows what it's doing, then it may go ahead and specify that the landing pad can have its critical edge split. The loop unswitch pass is one of these passes. It will split the critical edges of all edges coming from a loop to a landing pad not within the loop. Doing so will retain important loop analysis information, such as loop simplify. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155817 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 12513: Loop unrolling breaks with indirect branches.Andrew Trick2012-04-10
| | | | | | | | Take this opportunity to generalize the indirectbr bailout logic for loop transformations. CFG transformations will never get indirectbr right, and there's no point trying. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154386 91177308-0d34-0410-b5e6-96231b3b80d8
* Fast fix for PR12343:Stepan Dyatkovskiy2012-04-02
| | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=12343 We have not trivial way for splitting edges that are goes from indirect branch. We can do it with some tricks, but it should be additionally discussed. And it is still dangerous due to difficulty of indirect branches controlling. Fix forbids this case for unswitching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153879 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-16
| | | | | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved compile time:Stepan Dyatkovskiy2012-01-11
| | | | | | | | | | | | | | 1. Size heuristics changed. Now we calculate number of unswitching branches only once per loop. 2. Some checks was moved from UnswitchIfProfitable to processCurrentLoop, since it is not changed during processCurrentLoop iteration. It allows decide to skip some loops at an early stage. Extended statistics: - Added total number of instructions analyzed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147935 91177308-0d34-0410-b5e6-96231b3b80d8
* Reinstate r146578; it doesn't appear to be the cause of some recent execution-Chad Rosier2011-12-22
| | | | | | | | | | time regressions. In general, it is beneficial to compile-time. Original commit message: Fix for bug #11429: Wrong behaviour for switches. Small improvement for code size heuristics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147175 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r146578 to determine if it is the cause of a number ofChad Rosier2011-12-22
| | | | | | | | | | | performance regressions (both execution-time and compile-time) on our nightly testers. Original commit message: Fix for bug #11429: Wrong behaviour for switches. Small improvement for code size heuristics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147131 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for bug #11429: Wrong behaviour for switches. Small improvement for code ↵Stepan Dyatkovskiy2011-12-14
| | | | | | size heuristics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146578 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the landing pad basic block with the correct function. Also merge theBill Wendling2011-09-27
| | | | | | | | split landingpad instructions into a PHI node. PR11016 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140592 91177308-0d34-0410-b5e6-96231b3b80d8
* Bail on unswitching a switch statement for a case with a critical edge. We nameNick Lewycky2011-06-03
| | | | | | | | which edge to split by pred/succ pair, which means that we can end up splitting the wrong edge (by case value) in the switch statement entirely. Fixes PR10031! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132535 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor code for testing whether replacing one value with anotherDuncan Sands2010-11-18
| | | | | | | | | preserves LCSSA form out of ScalarEvolution and into the LoopInfo class. Use it to check that SimplifyInstruction simplifications are not breaking LCSSA form. Fixes PR8622. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119727 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix loop unswitching's assumption that a code path which eitherDan Gohman2010-09-01
| | | | | | | 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
* Remove arm_apcscc from the test files. It is the default and doing thisRafael Espindola2010-06-17
| | | | | | matches what llvm-gcc and clang now produce. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106221 91177308-0d34-0410-b5e6-96231b3b80d8
* RewriteLoopBodyWithConditionConstant can end up rewriting theChris Lattner2010-04-20
| | | | | | | | | condition we're unswitching on. In this case, don't try to simplify the second copy of the loop which may be dead or not, but is probably a constant now. This fixes PR6879 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101870 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a crash in loop unswitch on a loop invariant vector condition.Chris Lattner2010-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95055 91177308-0d34-0410-b5e6-96231b3b80d8
* remove an unreduced testcase, rename another.Chris Lattner2010-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95054 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting patch in revision 89758, initial attempt at fixing PR5373 has ↵Edward O'Callaghan2009-11-25
| | | | | | proven to be bogus. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89844 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR5373, Credit to Jakub Staszak.Edward O'Callaghan2009-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89758 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the dominator verification code out of special code embedded withinDan Gohman2009-09-28
| | | | | | | | | | | | | the PassManager code into a regular verifyAnalysis method. Also, reorganize loop verification. Make the LoopPass infrastructure call verifyLoop as needed instead of having LoopInfo::verifyAnalysis check every loop in the function after each looop pass. Add a new command-line argument, -verify-loop-info, to enable the expensive full checking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82952 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate more redundant llvm-as calls.Dan Gohman2009-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81540 91177308-0d34-0410-b5e6-96231b3b80d8
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-11
| | | | | | | | | input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix SplitCriticalEdge to properly update LCSSA form when splitting aDan Gohman2009-09-09
| | | | | | | | | | | loop exit edge -- new PHIs may be needed not only for the additional splits that are made to preserve LoopSimplify form, but also for the original split. Factor out the code that inserts new PHIs so that it can be used for both. Remove LoopRotation.cpp's code for manually updating LCSSA form, as it is now redundant. This fixes PR4934. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81363 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim unnecessary declarations.Dan Gohman2009-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81227 91177308-0d34-0410-b5e6-96231b3b80d8
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-08
| | | | | | | of using llvm-as, now that opt supports this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r80926, with fixes: keep the domtree informed of new blocksDan Gohman2009-09-08
| | | | | | | | | | | | | | | | that get created during loop unswitching, and fix SplitBlockPredecessors' LCSSA updating code to create new PHIs instead of trying to just move existing ones. Also, optimize Loop::verifyLoop, since it gets called a lot. Use searches on a sorted list of blocks instead of calling the "contains" function, as is done in other places in the Loop class, since "contains" does a linear search. Also, don't call verifyLoop from LoopSimplify or LCSSA, as the PassManager is already calling verifyLoop as part of LoopInfo's verifyAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81221 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r80926. It causes loop unswitch assertion and slow down some JIT ↵Evan Cheng2009-09-06
| | | | | | tests significantly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81101 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually test something. Use PR3170 test case.Devang Patel2008-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60727 91177308-0d34-0410-b5e6-96231b3b80d8
* Undo previous patch. Devang Patel2008-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60701 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore conditions that are outside the loop.Devang Patel2008-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58631 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve dominance frontier while trivially unswitching loop.Devang Patel2008-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52438 91177308-0d34-0410-b5e6-96231b3b80d8
* Update dom tree. Fix PR 2372.Devang Patel2008-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51887 91177308-0d34-0410-b5e6-96231b3b80d8
* sabre brings to my attention that the 'tr' suffix is also obsoleteGabor Greif2008-05-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51349 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the last test with .llx extension to .ll, resolve duplicate test by ↵Gabor Greif2008-05-20
| | | | | | renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51328 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade tests.Tanya Lattner2008-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48538 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in updating dominance frontier after loop Devang Patel2007-10-05
| | | | | | | | | unswitch when frontier includes basic blocks that are not inside loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42654 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tests using "| wc -l | grep ..." to use the count script.Dan Gohman2007-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41097 91177308-0d34-0410-b5e6-96231b3b80d8
* Update dominator info for the middle blocks created while splitingDevang Patel2007-08-02
| | | | | | | | | | 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
* Update dominator info for the middle blocks created while splitingDevang Patel2007-08-01
| | | | | | | | | | 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
* Bunch of tests to check loop passes.Devang Patel2007-07-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40629 91177308-0d34-0410-b5e6-96231b3b80d8