[PATCH] D90689: [CodeExtractor] Replace uses of extracted bitcasts in out-of-region lifetime markers
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 09:46:09 PST 2020
vsk added a comment.
In the example, what pass/component is responsible for creating `%1 = bitcast i32* %0 to i8*`?
If it's CodeExtractor itself, it would be nice to solve the problem earlier by getting rid of bitcasts which only exist to wire up lifetime markers. I tried doing that in 26ee8aff2 <https://reviews.llvm.org/rG26ee8aff2b85ee28a2b2d0b1860d878b512fbdef>, but had to revert (099bffe7f <https://reviews.llvm.org/rG099bffe7f7df41d66195ce33e91888a4a16c6b4a>) because llvm doesn't support specializing its lifetime intrinsics on opaque pointer types. That's a bug, I think: if we fix that, perhaps this whole problem goes away.
OTOH, if this `%1 = bitcast i32* %0 to i8*` value comes from a frontend or another pass, I think the approach taken in this patch is reasonable. Please add a test (perhaps in the CodeExtractor unittest).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90689/new/
https://reviews.llvm.org/D90689
More information about the llvm-commits
mailing list