[PATCH] D37611: [IfConversion] More simple, correct dead/kill liveness handling
Jesper Antonsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 09:28:35 PDT 2017
JesperAntonsson added inline comments.
================
Comment at: lib/CodeGen/LivePhysRegs.cpp:294
+ if (MO->readsReg())
+ MO->setIsKill(IsNotLive);
+ }
----------------
kparzysz wrote:
> It doesn't look like this code going to add a kill flag to the use of `r0` in the add.
>
> ```
> r0 = add r0, r1
> ... = r0
> ```
True, good catch. It would also remove pre-existing kill flags.
Seems I should first set dead flags like I do now, then do a partial stepBackward over (non-early-clobber?) defs only, before I loop over use-MOs to set kill flags, and then do the remaining stepBackward? Would that be a good approach?
https://reviews.llvm.org/D37611
More information about the llvm-commits
mailing list