[PATCH] D78657: [PowerPC] Fix the liveins for ppc-expand-isel pass
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 02:41:12 PDT 2020
lkail added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCExpandISEL.cpp:390
- // in MBB should be treated as liveins of NewSuccessor.
- // Note: Cannot use stepBackward instead since we are using the Reg
- // liveness state at the end of MBB (liveOut of MBB) as the liveIn for
----------------
ZhangKang wrote:
> lkail wrote:
> > I notice `computeAndAddLiveIns` will call `stepBackward`, this comment says it will lead to cyclic dependence. Is it still the case for current code?
> If the livenins of successors are right, we can using `stepBackward` method to calculate the livenins for this MachineBasicBlock.
> Here, the successors of MBB are equal the to the successors of NewSuccessor, and the liveins of successors are right for MBB. So we can use `stepBackward` method to calculate the liveness for NewSuccessor.
Ok, I get it. The origin implementation
```
// Copy the original liveIns of MBB to NewSuccessor.
```
has been problematic. We might have some registers killed before the `isel` instruction.
================
Comment at: llvm/test/CodeGen/PowerPC/expand-isel-liveness.mir:50
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3, implicit killed $x4, implicit killed $x5
...
----------------
Could you provide test case that `ISEL` is the last instruction of a MBB?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78657/new/
https://reviews.llvm.org/D78657
More information about the llvm-commits
mailing list