[PATCH] D45130: [CallSiteSplitting] Do not perform callsite splitting inside landing pad

Jun Bum Lim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 4 08:18:54 PDT 2018


junbuml added inline comments.


================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:217-220
+  if (CallSiteBB->isEHPad())
+    return false;
+
   return CallSiteBB->canSplitPredecessors();
----------------
twoh wrote:
> junbuml wrote:
> > Since canSplitPredecessors() simply return false for EHPad except LandingPad, you can return false for EHPad here like : 
> > 
> >    return !CallSiteBB->isEHPad();
> @junbuml Got it. I think it is still worth to leave calling canSplitPredecessors here, in case of more cases to be added to the function in the future (the function name seems generic enough to check more than EHPad). What do you think?
I understand. In this patch, using these two seems okay for now. 
However,I think we should ultimately have a single function to do canSplitPredecessors, which works for SplitEdge() as well as SplitBlockPredecessors().  I didn't look at in great detail, but I guess it must be okay to specifically handle LandingPad in SplitEdge(). 


Repository:
  rL LLVM

https://reviews.llvm.org/D45130





More information about the llvm-commits mailing list