[llvm-commits] CVS: llvm/lib/Transforms/Utils/LCSSA.cpp
Owen Anderson
resistor at mac.com
Thu Jun 8 13:03:06 PDT 2006
Changes in directory llvm/lib/Transforms/Utils:
LCSSA.cpp updated: 1.15 -> 1.16
---
Log message:
Update some comments, and expose LCSSAID in preparation for having other passes
require LCSSA.
---
Diffs of the changes: (+8 -1)
LCSSA.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Utils/LCSSA.cpp
diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.15 llvm/lib/Transforms/Utils/LCSSA.cpp:1.16
--- llvm/lib/Transforms/Utils/LCSSA.cpp:1.15 Mon Jun 5 23:36:36 2006
+++ llvm/lib/Transforms/Utils/LCSSA.cpp Thu Jun 8 15:02:53 2006
@@ -86,7 +86,9 @@
}
FunctionPass *llvm::createLCSSAPass() { return new LCSSA(); }
+const PassInfo *llvm::LCSSAID = X.getPassInfo();
+/// runOnFunction - Process all loops in the function, inner-most out.
bool LCSSA::runOnFunction(Function &F) {
bool changed = false;
LI = &getAnalysis<LoopInfo>();
@@ -100,6 +102,8 @@
return changed;
}
+/// visitSubloop - Recursively process all subloops, and then process the given
+/// loop if it has live-out values.
bool LCSSA::visitSubloop(Loop* L) {
for (Loop::iterator I = L->begin(), E = L->end(); I != E; ++I)
visitSubloop(*I);
@@ -131,7 +135,8 @@
return true;
}
-/// processInstruction -
+/// processInstruction - Given a live-out instruction, insert LCSSA Phi nodes,
+/// eliminate all out-of-loop uses.
void LCSSA::processInstruction(Instruction* Instr,
const std::vector<BasicBlock*>& exitBlocks)
{
@@ -252,6 +257,8 @@
return AffectedValues;
}
+/// getValueDominatingBlock - Return the value within the potential dominators
+/// map that dominates the given block.
Instruction *LCSSA::getValueDominatingBlock(BasicBlock *BB,
std::map<BasicBlock*, Instruction*>& PotDoms) {
DominatorTree::Node* bbNode = DT->getNode(BB);
More information about the llvm-commits
mailing list