rsmith added a comment.

In D82314#2109728 <https://reviews.llvm.org/D82314#2109728>, @lxfind wrote:

> @rsmith Thanks. That's a good point. Do you know if there already exists 
> optimization passes in LLVM that attempts to shrink the range of lifetime 
> intrinsics? If so, I am curious why that does not help in this case. Or is it 
> generally unsafe to move the lifetime intrinsics, and we could only do it 
> here with specific context knowledge about coroutines.


I don't know for sure, but I would expect someone to have implemented such a 
pass already. Moving a lifetime start intrinsic later, past instructions that 
can't possibly reference the object in question, seems like it should always be 
safe and (presumably) should always be a good thing to do, and similarly for 
moving lifetime end markers earlier. It could be that such a pass exists but it 
is run too late in the pass pipeline, so the coroutine split pass doesn't get 
to take advantage of it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82314/new/

https://reviews.llvm.org/D82314



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to