[PATCH] D44627: [CallSiteSplitting] Only record conditions up to the IDom(call site).

Jun Bum Lim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 29 08:12:45 PDT 2018


junbuml added inline comments.


================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:468-479
+  // Record common conditions starting from StopAt. Those conditions hold for
+  // all paths to CS. Adding them gives the inliner a better chance at inlining
+  // CS.
+  ConditionsTy CommonConditions;
+  if (StopAt)
+    recordConditions(CS, StopAt, CommonConditions, nullptr);
+  if (!CommonConditions.empty())
----------------
junbuml wrote:
> I think we should move this to line 461. Otherwise, we wont be able to handle the case where a known value is not detected in immediate predecessors, but there is a known value after IDom. 
> 
> Looks like test_cond_no_effect() shows the case. 
In this case (test_cond_no_effect), we should just pass the known value without splitting.  Looks like I tried thing similar before in https://reviews.llvm.org/D41782. 


https://reviews.llvm.org/D44627





More information about the llvm-commits mailing list