[llvm-commits] CVS: llvm/lib/Transforms/IPO/LowerSetJmp.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 12 20:03:01 PDT 2003
Changes in directory llvm/lib/Transforms/IPO:
LowerSetJmp.cpp updated: 1.5 -> 1.6
---
Log message:
Minor cleanups
---
Diffs of the changes: (+3 -5)
Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp
diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.5 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.6
--- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.5 Sun Oct 12 19:57:16 2003
+++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Sun Oct 12 20:02:33 2003
@@ -136,9 +136,7 @@
for (Value::use_iterator B = SetJmp->use_begin(), E = SetJmp->use_end();
B != E; ++B) {
- Instruction* I = cast<Instruction>(*B);
- BasicBlock* BB = I->getParent();
- Function* Func = BB->getParent();
+ BasicBlock* BB = cast<Instruction>(*B)->getParent();
DFSBlocks.insert(df_begin(BB), df_end(BB));
}
@@ -414,7 +412,6 @@
CI.getCalledFunction()->isIntrinsic()) return;
BasicBlock* OldBB = CI.getParent();
- Function* Func = OldBB->getParent();
// If not reachable from a setjmp call, don't transform.
if (!DFSBlocks.count(OldBB)) return;
@@ -424,6 +421,7 @@
NewBB->setName("Call2Invoke");
// Reposition the split BB in the BB list to make things tidier.
+ Function* Func = OldBB->getParent();
Func->getBasicBlockList().remove(NewBB);
Func->getBasicBlockList().insert(++Function::iterator(OldBB), NewBB);
@@ -453,7 +451,6 @@
II.getCalledFunction()->isIntrinsic()) return;
BasicBlock* BB = II.getParent();
- Function* Func = BB->getParent();
// If not reachable from a setjmp call, don't transform.
if (!DFSBlocks.count(BB)) return;
@@ -461,6 +458,7 @@
BasicBlock* NormalBB = II.getNormalDest();
BasicBlock* ExceptBB = II.getExceptionalDest();
+ Function* Func = BB->getParent();
BasicBlock* NewExceptBB = new BasicBlock("InvokeExcept", Func);
BasicBlock::InstListType& InstList = NewExceptBB->getInstList();
More information about the llvm-commits
mailing list