[llvm-commits] [llvm] r101846 - /llvm/trunk/lib/Transforms/IPO/Inliner.cpp
Chris Lattner
sabre at nondot.org
Mon Apr 19 17:47:09 PDT 2010
Author: lattner
Date: Mon Apr 19 19:47:08 2010
New Revision: 101846
URL: http://llvm.org/viewvc/llvm-project?rev=101846&view=rev
Log:
make the inliner do less work for leaf functions.
Modified:
llvm/trunk/lib/Transforms/IPO/Inliner.cpp
Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=101846&r1=101845&r2=101846&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Mon Apr 19 19:47:08 2010
@@ -333,6 +333,10 @@
DEBUG(dbgs() << ": " << CallSites.size() << " call sites.\n");
+ // If there are no calls in this function, exit early.
+ if (CallSites.empty())
+ return false;
+
// Now that we have all of the call sites, move the ones to functions in the
// current SCC to the end of the list.
unsigned FirstCallInSCC = CallSites.size();
More information about the llvm-commits
mailing list