[PATCH] D133777: [SelectOpti] Fix lifetime intrinsic bug
Sotiris Apostolakis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 11:28:35 PDT 2022
apostolakis marked an inline comment as done.
apostolakis added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectOptimize.cpp:432
+ // case any use is sinked).
+ SmallVector<Instruction *, 2> EndLifetimeCalls;
+ for (Instruction &I : *StartBlock) {
----------------
davidxl wrote:
> is it better to track the life end variable and inserted after the target instruction?
Yes as you said, the potential gains are small since the code region is just a single split basic block.
Also note that, to begin with, currently-emitted lifetimes intrinsics are not very tight to the actual lifetime of objects.
This is probably because other optimizations are also conservative when placing them and moving them .
For example, for the case that caused the bug, the lifetime ended 4 instructions after the final use of the variable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133777/new/
https://reviews.llvm.org/D133777
More information about the llvm-commits
mailing list