LLVM: lib/Target/X86/X86SuppressAPXForReloc.cpp File Reference (original) (raw)

This pass is added to suppress APX features for relocations. More...

Go to the source code of this file.

Macros
#define DEBUG_TYPE "x86-suppress-apx-for-relocation"
Functions
INITIALIZE_PASS_BEGIN (X86SuppressAPXForRelocationPass, DEBUG_TYPE, "X86 Suppress APX features for relocation", false, false) INITIALIZE_PASS_END(X86SuppressAPXForRelocationPass
static void suppressEGPRRegClass (MachineRegisterInfo *MRI, MachineInstr &MI, const X86Subtarget &ST, unsigned int OpNum)
static void suppressEGPRRegClassInRegAndUses (MachineRegisterInfo *MRI, MachineInstr &MI, const X86Subtarget &ST, unsigned int OpNum)
static bool handleInstructionWithEGPR (MachineFunction &MF, const X86Subtarget &ST)
static bool handleNDDOrNFInstructions (MachineFunction &MF, const X86Subtarget &ST)
Variables
cl::opt< bool > X86EnableAPXForRelocation ("x86-enable-apx-for-relocation", cl::desc("Enable APX features (EGPR, NDD and NF) for instructions with " "relocations on x86-64 ELF"), cl::init(false))
DEBUG_TYPE
X86 Suppress APX features for relocation
X86 Suppress APX features for false

This pass is added to suppress APX features for relocations.

It's used to keep backward compatibility with old version of linker having no APX support. It can be removed after APX support is included in the default linker on OS.

Definition in file X86SuppressAPXForReloc.cpp.

DEBUG_TYPE

#define DEBUG_TYPE "x86-suppress-apx-for-relocation"

handleInstructionWithEGPR()

Definition at line 97 of file X86SuppressAPXForReloc.cpp.

References llvm::X86::AddrDisp, llvm::dbgs(), llvm::X86II::getMemoryOperandNo(), llvm::X86II::getOperandBias(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::getTargetFlags(), LLVM_DEBUG, MBB, MI, llvm::X86II::MO_GOTPCREL, llvm::X86II::MO_GOTTPOFF, MRI, and suppressEGPRRegClassInRegAndUses().

handleNDDOrNFInstructions()

Definition at line 161 of file X86SuppressAPXForReloc.cpp.

References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::X86::AddrDisp, llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::dbgs(), llvm::MachineInstr::findRegisterDefOperand(), llvm::X86II::getMemoryOperandNo(), llvm::X86II::getOperandBias(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::isDead(), LLVM_DEBUG, llvm_unreachable, llvm::make_early_inc_range(), MBB, MI, llvm::X86II::MO_GOTPCREL, llvm::X86II::MO_GOTTPOFF, MRI, Reg, llvm::MachineOperand::setIsDead(), suppressEGPRRegClassInRegAndUses(), and TII.

INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( X86SuppressAPXForRelocationPass ,
DEBUG_TYPE ,
"X86 Suppress APX features for relocation" ,
false ,
false )

suppressEGPRRegClass()

suppressEGPRRegClassInRegAndUses()

DEBUG_TYPE

false

X86 Suppress APX features for false

relocation

X86 Suppress APX features for relocation

X86EnableAPXForRelocation

cl::opt< bool > X86EnableAPXForRelocation("x86-enable-apx-for-relocation", cl::desc("Enable APX features (EGPR, NDD and NF) for instructions with " "relocations on x86-64 ELF"), cl::init(false)) ( "x86-enable-apx-for-relocation" ,
cl::desc("Enable APX features (EGPR, NDD and NF) for instructions with " "relocations on x86-64 ELF") ,
cl::init(false) )