[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneFunction.cpp CodeExtractor.cpp InlineFunction.cpp SimplifyCFG.cpp
Dan Gohman
djg at cray.com
Thu Mar 22 09:39:31 PDT 2007
Changes in directory llvm/lib/Transforms/Utils:
CloneFunction.cpp updated: 1.43 -> 1.44
CodeExtractor.cpp updated: 1.50 -> 1.51
InlineFunction.cpp updated: 1.54 -> 1.55
SimplifyCFG.cpp updated: 1.118 -> 1.119
---
Log message:
Change uses of Function::front to Function::getEntryBlock for readability.
---
Diffs of the changes: (+8 -6)
CloneFunction.cpp | 2 +-
CodeExtractor.cpp | 2 +-
InlineFunction.cpp | 7 ++++---
SimplifyCFG.cpp | 3 ++-
4 files changed, 8 insertions(+), 6 deletions(-)
Index: llvm/lib/Transforms/Utils/CloneFunction.cpp
diff -u llvm/lib/Transforms/Utils/CloneFunction.cpp:1.43 llvm/lib/Transforms/Utils/CloneFunction.cpp:1.44
--- llvm/lib/Transforms/Utils/CloneFunction.cpp:1.43 Thu Mar 1 21:11:20 2007
+++ llvm/lib/Transforms/Utils/CloneFunction.cpp Thu Mar 22 11:38:57 2007
@@ -59,7 +59,7 @@
CodeInfo->ContainsUnwinds |= isa<UnwindInst>(BB->getTerminator());
CodeInfo->ContainsDynamicAllocas |= hasDynamicAllocas;
CodeInfo->ContainsDynamicAllocas |= hasStaticAllocas &&
- BB != &BB->getParent()->front();
+ BB != &BB->getParent()->getEntryBlock();
}
return NewBB;
}
Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp
diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.50 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.51
--- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.50 Mon Feb 12 20:10:56 2007
+++ llvm/lib/Transforms/Utils/CodeExtractor.cpp Thu Mar 22 11:38:57 2007
@@ -104,7 +104,7 @@
bool HasPredsFromRegion = false;
unsigned NumPredsOutsideRegion = 0;
- if (Header != &Header->getParent()->front()) {
+ if (Header != &Header->getParent()->getEntryBlock()) {
PHINode *PN = dyn_cast<PHINode>(Header->begin());
if (!PN) return; // No PHI nodes.
Index: llvm/lib/Transforms/Utils/InlineFunction.cpp
diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.54 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.55
--- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.54 Tue Feb 20 14:52:03 2007
+++ llvm/lib/Transforms/Utils/InlineFunction.cpp Thu Mar 22 11:38:57 2007
@@ -265,9 +265,10 @@
// Transfer all of the allocas over in a block. Using splice means
// that the instructions aren't removed from the symbol table, then
// reinserted.
- Caller->front().getInstList().splice(InsertPoint,
- FirstNewBlock->getInstList(),
- AI, I);
+ Caller->getEntryBlock().getInstList().splice(
+ InsertPoint,
+ FirstNewBlock->getInstList(),
+ AI, I);
}
}
}
Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.118 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.119
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.118 Fri Mar 2 17:01:14 2007
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Thu Mar 22 11:38:57 2007
@@ -1185,7 +1185,8 @@
assert(BB && BB->getParent() && "Block not embedded in function!");
assert(BB->getTerminator() && "Degenerate basic block encountered!");
- assert(&BB->getParent()->front() != BB && "Can't Simplify entry block!");
+ assert(&BB->getParent()->getEntryBlock() != BB &&
+ "Can't Simplify entry block!");
// Remove basic blocks that have no predecessors... which are unreachable.
if (pred_begin(BB) == pred_end(BB) ||
More information about the llvm-commits
mailing list