[PATCH] D12979: Avoid inlining in exception handling context

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 14:49:53 PDT 2015


hfinkel added inline comments.

================
Comment at: lib/Transforms/IPO/PruneEH.cpp:203
@@ +202,3 @@
+        MarkColdInEHR = true;
+        break;
+      }
----------------
Why do you 'break;' here? If you do that, you'll only visit the first function in each call graph.

I think you want to have:

  if (!MarkColdInEHR && SCCMightUnwind) {
    MarkColdInEHR = true;
     for (CallGraphSCC::iterator I = SCC.begin(), E = SCC.end(); I != E; ++I) {
       Function *F = (*I)->getFunction();
       if (!F)
         continue;

       AddColdForCSInEH(F);
    }
  }



http://reviews.llvm.org/D12979





More information about the llvm-commits mailing list