[llvm-commits] [llvm] r57870 - /llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp

Dan Gohman gohman at apple.com
Mon Oct 20 20:10:30 PDT 2008


Author: djg
Date: Mon Oct 20 22:10:28 2008
New Revision: 57870

URL: http://llvm.org/viewvc/llvm-project?rev=57870&view=rev
Log:
Use Function::getEntryBlock() instead of Function::front(), for clarity.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp?rev=57870&r1=57869&r2=57870&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp Mon Oct 20 22:10:28 2008
@@ -72,7 +72,7 @@
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
     if (!I->isDeclaration())
       // Insert counter at the start of the function
-      IncrementCounterInBlock(I->begin(), i++, Counters);
+      IncrementCounterInBlock(&I->getEntryBlock(), i++, Counters);
 
   // Add the initialization call to main.
   InsertProfilingInitCall(Main, "llvm_start_func_profiling", Counters);





More information about the llvm-commits mailing list