mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
CodeGen: ignore DEBUG_VALUE nodes in KILL tagging
DEBUG_VALUE nodes do not take part in code generation. Ignore them when performing KILL updates. Addresses PR23486. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1115,6 +1115,12 @@ static void toggleBundleKillFlag(MachineInstr *MI, unsigned Reg,
|
||||
if (!MO->isReg() || MO->isDef() || Reg != MO->getReg())
|
||||
continue;
|
||||
|
||||
// DEBUG_VALUE nodes do not contribute to code generation and should
|
||||
// always be ignored. Failure to do so may result in trying to modify
|
||||
// KILL flags on DEBUG_VALUE nodes, which is distressing.
|
||||
if (MO->isDebug())
|
||||
continue;
|
||||
|
||||
// If the register has the internal flag then it could be killing an
|
||||
// internal def of the register. In this case, just skip. We only want
|
||||
// to toggle the flag on operands visible outside the bundle.
|
||||
|
Reference in New Issue
Block a user