Skip to content

Commit fe18e76

Browse files
committed
Add comments
1 parent b22127b commit fe18e76

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Target/X86/X86SuppressAPXForReloc.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ static void suppressEGPRRegClass(MachineRegisterInfo *MRI, MachineInstr &MI,
7878
MRI->setRegClass(Reg, NewRC);
7979
}
8080

81+
// Suppress EGPR in operand 0 of PHI instruction to avoid APX relocation types
82+
// emitted. If the register in operand 0 of instruction with relocation is used
83+
// in the PHI instruction, it may be replaced with operand 0 of PHI instruction
84+
// (maybe EGPR) after PHI elimination and Machine Copy Propagation pass. That
85+
// may lead to emit APX relocation types which may break the backward
86+
// compatibility with builtin linkers on existing OS.
8187
static void suppressEGPRRegClassInRegUses(MachineRegisterInfo *MRI,
8288
const X86Subtarget &ST,
8389
Register Reg) {

0 commit comments

Comments
 (0)