[PATCH] D19884: Fix a bug when hoist spill to a BB with landingpad successor

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 22:37:57 PDT 2016


wmi added a comment.

Address Eric's comment.


================
Comment at: lib/CodeGen/InlineSpiller.cpp:1397
@@ +1396,3 @@
+    LiveInterval &OrigLI = LIS.getInterval(OrigReg);
+    SA->analyze(&OrigLI, true);
+
----------------
echristo wrote:
> Needs a comment of why you want to skip the analysis here.
Comments added

================
Comment at: test/CodeGen/X86/hoist-spill-lpad.ll:3-5
@@ +2,5 @@
+
+; PR27612. When spill is hoisted to a BB with landingpad successor, and if
+; the VNI of the spill reg lives into the landingpad successor, the
+; spill should be inserted before the call which may throw exception.
+;
----------------
echristo wrote:
> I think this can be reworded in a more general way such that it's clear if this breaks what's going on. If I understand correctly we need to use the split point as the insert location because the spill reg could be live through the next block?
Yes, the spill should live through both the fall through path and the landingpad path of the same call which may throw, so we should use the split point as the insert point. comment fixed.


Repository:
  rL LLVM

http://reviews.llvm.org/D19884





More information about the llvm-commits mailing list