[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp LICM.cpp ScalarReplAggregates.cpp TailRecursionElimination.cpp
Dan Gohman
djg at cray.com
Thu Mar 22 09:39:32 PDT 2007
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.671 -> 1.672
LICM.cpp updated: 1.88 -> 1.89
ScalarReplAggregates.cpp updated: 1.80 -> 1.81
TailRecursionElimination.cpp updated: 1.29 -> 1.30
---
Log message:
Change uses of Function::front to Function::getEntryBlock for readability.
---
Diffs of the changes: (+5 -4)
InstructionCombining.cpp | 3 ++-
LICM.cpp | 2 +-
ScalarReplAggregates.cpp | 2 +-
TailRecursionElimination.cpp | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.671 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.672
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.671 Wed Mar 21 18:19:50 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Mar 22 11:38:57 2007
@@ -9946,7 +9946,8 @@
if (isa<PHINode>(I) || I->mayWriteToMemory()) return false;
// Do not sink alloca instructions out of the entry block.
- if (isa<AllocaInst>(I) && I->getParent() == &DestBlock->getParent()->front())
+ if (isa<AllocaInst>(I) && I->getParent() ==
+ &DestBlock->getParent()->getEntryBlock())
return false;
// We can only sink load instructions if there is nothing between the load and
Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.88 llvm/lib/Transforms/Scalar/LICM.cpp:1.89
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.88 Tue Mar 6 22:41:30 2007
+++ llvm/lib/Transforms/Scalar/LICM.cpp Thu Mar 22 11:38:57 2007
@@ -471,7 +471,7 @@
if (I.getType() != Type::VoidTy)
AI = new AllocaInst(I.getType(), 0, I.getName(),
- I.getParent()->getParent()->front().begin());
+ I.getParent()->getParent()->getEntryBlock().begin());
// Secondly, insert load instructions for each use of the instruction
// outside of the loop.
Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.80 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.81
--- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.80 Mon Mar 19 13:25:57 2007
+++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Thu Mar 22 11:38:57 2007
@@ -891,7 +891,7 @@
++NumConverted;
BasicBlock *EntryBlock = AI->getParent();
- assert(EntryBlock == &EntryBlock->getParent()->front() &&
+ assert(EntryBlock == &EntryBlock->getParent()->getEntryBlock() &&
"Not in the entry block!");
EntryBlock->getInstList().remove(AI); // Take the alloca out of the program.
Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.29 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.30
--- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.29 Sat Feb 10 19:23:03 2007
+++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Thu Mar 22 11:38:57 2007
@@ -108,7 +108,7 @@
// If this alloca is in the body of the function, or if it is a variable
// sized allocation, we cannot tail call eliminate calls marked 'tail'
// with this mechanism.
- if (BB != &BB->getParent()->front() ||
+ if (BB != &BB->getParent()->getEntryBlock() ||
!isa<ConstantInt>(AI->getArraySize()))
CannotTCETailMarkedCall = true;
}
More information about the llvm-commits
mailing list