[PATCH] D37611: [IfConversion] More simple, correct dead/kill liveness handling
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 10:09:54 PDT 2017
MatzeB added inline comments.
================
Comment at: lib/CodeGen/LivePhysRegs.cpp:294
+ if (MO->readsReg())
+ MO->setIsKill(IsNotLive);
+ }
----------------
JesperAntonsson wrote:
> 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?
Should be easy enough to factor out the def/use loops in `stepBackward()` into two functions that can be used individually.
https://reviews.llvm.org/D37611
More information about the llvm-commits
mailing list