[llvm-commits] [llvm] r124991 - /llvm/trunk/lib/Analysis/InlineCost.cpp

Eric Christopher echristo at apple.com
Sun Feb 6 13:27:46 PST 2011


Author: echristo
Date: Sun Feb  6 15:27:46 2011
New Revision: 124991

URL: http://llvm.org/viewvc/llvm-project?rev=124991&view=rev
Log:
Remove premature optimization that avoided calculating argument weights
if we weren't going to inline the function. The rest of the code using
this was removed.

Fixes PR9154.

Modified:
    llvm/trunk/lib/Analysis/InlineCost.cpp

Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=124991&r1=124990&r2=124991&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Sun Feb  6 15:27:46 2011
@@ -242,11 +242,6 @@
   if (Metrics.NumRets==1)
     --Metrics.NumInsts;
 
-  // Don't bother calculating argument weights if we are never going to inline
-  // the function anyway.
-  if (NeverInline())
-    return;
-
   // Check out all of the arguments to the function, figuring out how much
   // code can be eliminated if one of the arguments is a constant.
   ArgumentWeights.reserve(F->arg_size());





More information about the llvm-commits mailing list