[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
Thu May 5 09:44:14 PDT 2016


wmi added inline comments.

================
Comment at: lib/CodeGen/SplitKit.h:124-127
@@ -123,6 +123,6 @@
 
   /// analyze - set CurLI to the specified interval, and analyze how it may be
   /// split.
   void analyze(const LiveInterval *li);
 
   /// didRepairRange() - Returns true if CurLI was invalid and has been repaired
----------------
echristo wrote:
> wmi wrote:
> > echristo wrote:
> > > I'm not sure I get it after your changes. Can you explain what you're doing now with setParent in a bit more detail?
> > I use setParent to set SplitAnalysis::CurLi, which will be used in SplitAnalysis::computeLastSplitPoint to compute the last split point, i.e., insert point of bb.
> Why aren't you just doing something like:
> 
>   if (SA->getParent() != OrigLi)
>     analyze(OrigLi);
>   SA->getLastSplitPointIter(BB);
> 
> or some such? I'm probably missing something here :)
> 
> 
Because there are more than one place (now two, but maybe more in the future) where getLastSplitPointIter is called, I choose to set CurLI for SA at the beginning.

================
Comment at: test/CodeGen/X86/hoist-spill-lpad.ll:112
@@ +111,3 @@
+; Function Attrs: argmemonly nounwind
+declare void @llvm.lifetime.start(i64, i8* nocapture)
+
----------------
echristo wrote:
> Can delete.
unused func decls removed.


http://reviews.llvm.org/D19884





More information about the llvm-commits mailing list