Ignore debugger intrinsics when doing inlining size computations.
authorChris Lattner <sabre@nondot.org>
Mon, 22 Nov 2004 17:21:44 +0000 (17:21 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 22 Nov 2004 17:21:44 +0000 (17:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18109 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/InlineSimple.cpp

index 6a43143d87b8657742f893c17081a8e556b6fdac..5916f10402f3a2ab36852e2e2c204ed62b349ce0 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "Inliner.h"
 #include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h"
 #include "llvm/Function.h"
 #include "llvm/Type.h"
 #include "llvm/Support/CallSite.h"
@@ -147,7 +148,7 @@ void FunctionInfo::analyzeFunction(Function *F) {
   for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
     for (BasicBlock::const_iterator II = BB->begin(), E = BB->end();
          II != E; ++II) {
-      ++NumInsts;
+      if (!isa<DbgInfoIntrinsic>(II)) ++NumInsts;
 
       // If there is an alloca in the body of the function, we cannot currently
       // inline the function without the risk of exploding the stack.