summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Assert that we aren't trying to split the critical edge of a landing pad. DoingBill Wendling2011-08-171-0/+5
| | | | | | so requires more care than this generic algorithm should handle. llvm-svn: 137866
* PR10386: Don't try to split an edge from an indirectbr.Eli Friedman2011-07-191-2/+9
| | | | llvm-svn: 135534
* Reinstate r133513 (reverted in r133700) with an additional fix for aJay Foad2011-06-231-38/+16
| | | | | | -Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708
* Revert r133513:Eric Christopher2011-06-231-16/+38
| | | | | | | | | "Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512)." Due to some additional warnings. llvm-svn: 133700
* Reinstate r133435 and r133449 (reverted in r133499) now that the clangJay Foad2011-06-211-38/+16
| | | | | | self-hosted build failure has been fixed (r133512). llvm-svn: 133513
* Revert r133435 and r133449 to appease buildbots.Chad Rosier2011-06-211-16/+38
| | | | llvm-svn: 133499
* Change how PHINodes store their operands.Jay Foad2011-06-201-38/+16
| | | | | | | | | | | | | | | | | | | Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
* Preserve line number information.Devang Patel2011-05-171-1/+2
| | | | llvm-svn: 131480
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+1
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-301-0/+1
| | | | llvm-svn: 128535
* Remove code for updating dominance frontiers and some outdated references toCameron Zwarich2011-01-181-44/+6
| | | | | | dominance and post-dominance frontiers. llvm-svn: 123725
* indentationChris Lattner2011-01-141-1/+1
| | | | llvm-svn: 123426
* split dom frontier handling stuff out to its own DominanceFrontier header,Chris Lattner2011-01-021-1/+1
| | | | | | so that Dominators.h is *just* domtree. Also prune #includes a bit. llvm-svn: 122714
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-231-2/+2
| | | | | | passes over to the new registration API. llvm-svn: 111815
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-2/+2
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* mass elimination of reliance on automatic iterator dereferencingGabor Greif2010-07-221-1/+1
| | | | llvm-svn: 109103
* cache result of operator*Gabor Greif2010-07-091-3/+5
| | | | llvm-svn: 107984
* cache result of operator*Gabor Greif2010-07-091-2/+3
| | | | llvm-svn: 107981
* cache result of operator*Gabor Greif2010-07-091-4/+6
| | | | llvm-svn: 107975
* rename pred_const_iterator to const_pred_iterator for consistency's sakeGabor Greif2010-03-251-1/+1
| | | | llvm-svn: 99567
* Speed up codegen prepare from 3.58s to 0.488s.Chris Lattner2010-02-131-19/+52
| | | | llvm-svn: 96081
* PHINode::getBasicBlockIndex is O(n) in the number of inputsChris Lattner2010-02-131-3/+10
| | | | | | | | to a PHI, avoid it in the common case where the BB occurs in the same index for multiple phis. This speeds up CGP on an insane testcase from 8.35 to 3.58s. llvm-svn: 96080
* iterate over preds using PHI information when available instead ofChris Lattner2010-02-131-6/+14
| | | | | | using pred_begin/end. It is much faster. llvm-svn: 96079
* Add Loop contains utility methods for testing whether a loopDan Gohman2009-12-181-2/+2
| | | | | | | | contains another loop, or an instruction. The loop form is substantially more efficient on large loops than the typical code it replaces. llvm-svn: 91654
* improve comment.Chris Lattner2009-11-011-1/+1
| | | | llvm-svn: 85725
* update the comment above llvm::SplitCriticalEdge, and makeChris Lattner2009-10-311-6/+21
| | | | | | it abort on IndirectBrInst as describe in the comment. llvm-svn: 85688
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Fix SplitCriticalEdge to properly update LCSSA form when splitting aDan Gohman2009-09-091-24/+51
| | | | | | | | | | 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. llvm-svn: 81363
* Preserve ProfileInfo.Andreas Neustifter2009-09-091-0/+7
| | | | llvm-svn: 81360
* Re-apply r80926, with fixes: keep the domtree informed of new blocksDan Gohman2009-09-081-8/+67
| | | | | | | | | | | | | | | 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. llvm-svn: 81221
* Revert r80926. It causes loop unswitch assertion and slow down some JIT ↵Evan Cheng2009-09-061-57/+8
| | | | | | tests significantly. llvm-svn: 81101
* Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verifyDan Gohman2009-09-031-8/+57
| | | | | | | | | that these passes are properly preserved. Fix several transformation passes that claimed to preserve LoopSimplify form but weren't. llvm-svn: 80926
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-2/+2
| | | | llvm-svn: 78948
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-1/+1
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-2/+3
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-3/+3
| | | | llvm-svn: 63198
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* LoopIndexSplit can sometimes result in cases where a block in its own ↵Owen Anderson2008-06-031-3/+6
| | | | | | | | domfrontier. Don't crash when we encounter one of these. llvm-svn: 51915
* Change class' public PassInfo variables to by initialized with theDan Gohman2008-05-131-1/+1
| | | | | | | | | | | address of the PassInfo directly instead of calling getPassInfo. This eliminates a bunch of dynamic initializations of static data. Also, fold RegisterPassBase into PassInfo, make a bunch of its data members const, and rearrange some code to initialize data members in constructors instead of using setter member functions. llvm-svn: 51022
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-4/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* fit in 80 colsChris Lattner2008-04-211-6/+6
| | | | llvm-svn: 50014
* Remove unused variableScott Michel2008-04-171-1/+0
| | | | llvm-svn: 49838
* Workaround for PR2207, in which pred_iterator assert gets triggered due to aScott Michel2008-04-161-2/+9
| | | | | | wee problem in Xcode 2.[45]/gcc 4.0.1. llvm-svn: 49831
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-3/+3
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
OpenPOWER on IntegriCloud