Change uses of Function::front to Function::getEntryBlock for readability.
[oota-llvm.git] / lib / Analysis / ProfileInfo.cpp
index 719eeada15aac0b99de951f2d4c76a092c5a5472..6eead0fd6ecad2a040d2b1b3ebe333cbf8dea0d8 100644 (file)
@@ -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.