summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-03-22 16:38:57 +0000
committerDan Gohman <gohman@apple.com>2007-03-22 16:38:57 +0000
commitdcb291faa4e15d0e0873e76d844d0535ac348afe (patch)
treebc1ad467f377cbb8d0f9ccae56b27586d660c920 /llvm/lib/Analysis
parent085b8d7ae2f8a3ce28f2da0b33a6b9e734c70823 (diff)
downloadbcm5719-llvm-dcb291faa4e15d0e0873e76d844d0535ac348afe.tar.gz
bcm5719-llvm-dcb291faa4e15d0e0873e76d844d0535ac348afe.zip
Change uses of Function::front to Function::getEntryBlock for readability.
llvm-svn: 35265
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ProfileInfo.cpp2
-rw-r--r--llvm/lib/Analysis/ProfileInfoLoader.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ProfileInfo.cpp b/llvm/lib/Analysis/ProfileInfo.cpp
index 719eeada15a..6eead0fd6ec 100644
--- a/llvm/lib/Analysis/ProfileInfo.cpp
+++ b/llvm/lib/Analysis/ProfileInfo.cpp
@@ -33,7 +33,7 @@ unsigned ProfileInfo::getExecutionCount(BasicBlock *BB) const {
// 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.
diff --git a/llvm/lib/Analysis/ProfileInfoLoader.cpp b/llvm/lib/Analysis/ProfileInfoLoader.cpp
index 23ceb52d8e2..dec29a40b17 100644
--- a/llvm/lib/Analysis/ProfileInfoLoader.cpp
+++ b/llvm/lib/Analysis/ProfileInfoLoader.cpp
@@ -152,7 +152,8 @@ void ProfileInfoLoader::getFunctionCounts(std::vector<std::pair<Function*,
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 {
OpenPOWER on IntegriCloud