[llvm-commits] CVS: llvm/lib/Analysis/ProfileInfo.cpp ProfileInfoLoader.cpp
Dan Gohman
djg at cray.com
Thu Mar 22 09:39:33 PDT 2007
Changes in directory llvm/lib/Analysis:
ProfileInfo.cpp updated: 1.10 -> 1.11
ProfileInfoLoader.cpp updated: 1.11 -> 1.12
---
Log message:
Change uses of Function::front to Function::getEntryBlock for readability.
---
Diffs of the changes: (+3 -2)
ProfileInfo.cpp | 2 +-
ProfileInfoLoader.cpp | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/lib/Analysis/ProfileInfo.cpp
diff -u llvm/lib/Analysis/ProfileInfo.cpp:1.10 llvm/lib/Analysis/ProfileInfo.cpp:1.11
--- llvm/lib/Analysis/ProfileInfo.cpp:1.10 Mon Feb 5 17:42:17 2007
+++ llvm/lib/Analysis/ProfileInfo.cpp Thu Mar 22 11:38:57 2007
@@ -33,7 +33,7 @@
// Are there zero predecessors of this block?
if (PI == PE) {
// If this is the entry block, look for the Null -> Entry edge.
- if (BB == &BB->getParent()->front())
+ if (BB == &BB->getParent()->getEntryBlock())
return getEdgeWeight(0, BB);
else
return 0; // Otherwise, this is a dead block.
Index: llvm/lib/Analysis/ProfileInfoLoader.cpp
diff -u llvm/lib/Analysis/ProfileInfoLoader.cpp:1.11 llvm/lib/Analysis/ProfileInfoLoader.cpp:1.12
--- llvm/lib/Analysis/ProfileInfoLoader.cpp:1.11 Tue Jan 30 14:08:36 2007
+++ llvm/lib/Analysis/ProfileInfoLoader.cpp Thu Mar 22 11:38:57 2007
@@ -152,7 +152,8 @@
getBlockCounts(BlockCounts);
for (unsigned i = 0, e = BlockCounts.size(); i != e; ++i)
- if (&BlockCounts[i].first->getParent()->front() == BlockCounts[i].first)
+ if (&BlockCounts[i].first->getParent()->getEntryBlock() ==
+ BlockCounts[i].first)
Counts.push_back(std::make_pair(BlockCounts[i].first->getParent(),
BlockCounts[i].second));
} else {
More information about the llvm-commits
mailing list