[PATCH] D106875: [DebugInfo] Attempt to preserve more information during tail duplication
Stephen Tozer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 28 06:15:54 PDT 2021
StephenTozer added inline comments.
================
Comment at: llvm/lib/CodeGen/TailDuplicator.cpp:233-242
+ UI = MRI->use_begin(VReg);
+ while (UI != MRI->use_end()) {
+ MachineOperand &UseMO = *UI;
+ MachineInstr *UseMI = UseMO.getParent();
+ ++UI;
+ if (!UseMI->isDebugValue())
+ continue;
----------------
jmorse wrote:
> Performance opinion: better to store debug uses and re-visit rather than enumerate all the uses again, it'll preserve the same performance characteristics as before this patch.
>
> Also: will not UseMO.setReg invalidate the vreg use list?
The vreg use list is (as far as I'm aware) a linked list, so calling `setReg` after iterating to the next use will not cause any issues.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106875/new/
https://reviews.llvm.org/D106875
More information about the llvm-commits
mailing list