mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-14 15:25:25 +00:00
If a vr is already marked alive in a bb, then it has PHI uses that are visited earlier, then it is not killed in the def block (i.e. not dead).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46763 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -436,8 +436,9 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &mf) {
|
||||
if (MO.isRegister() && MO.isDef() && MO.getReg()) {
|
||||
if (MRegisterInfo::isVirtualRegister(MO.getReg())) {
|
||||
VarInfo &VRInfo = getVarInfo(MO.getReg());
|
||||
// Defaults to dead
|
||||
VRInfo.Kills.push_back(MI);
|
||||
if (VRInfo.AliveBlocks.none())
|
||||
// If vr is not alive in any block, then defaults to dead.
|
||||
VRInfo.Kills.push_back(MI);
|
||||
} else if (MRegisterInfo::isPhysicalRegister(MO.getReg()) &&
|
||||
!ReservedRegisters[MO.getReg()]) {
|
||||
HandlePhysRegDef(MO.getReg(), MI);
|
||||
|
Reference in New Issue
Block a user