LLVM 22.0.0git
|
This pass is added to suppress APX features for relocations. More...
#include "X86.h"
#include "X86InstrInfo.h"
#include "X86RegisterInfo.h"
#include "X86Subtarget.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/Support/ErrorHandling.h"
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.
#define DEBUG_TYPE "x86-suppress-apx-for-relocation" |
Definition at line 32 of file X86SuppressAPXForReloc.cpp.
|
static |
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().
|
static |
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, llvm::MachineOperand::setIsDead(), suppressEGPRRegClassInRegAndUses(), and TII.
INITIALIZE_PASS_BEGIN | ( | X86SuppressAPXForRelocationPass | , |
DEBUG_TYPE | , | ||
"X86 Suppress APX features for relocation" | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 66 of file X86SuppressAPXForReloc.cpp.
References assert(), llvm::X86RegisterInfo::constrainRegClassToNonRex2(), llvm::X86II::isApxExtendedReg(), MI, and MRI.
Referenced by suppressEGPRRegClassInRegAndUses().
|
static |
Definition at line 86 of file X86SuppressAPXForReloc.cpp.
References MI, MRI, and suppressEGPRRegClass().
Referenced by handleInstructionWithEGPR(), and handleNDDOrNFInstructions().
DEBUG_TYPE |
Definition at line 59 of file X86SuppressAPXForReloc.cpp.
X86 Suppress APX features for false |
Definition at line 60 of file X86SuppressAPXForReloc.cpp.
X86 Suppress APX features for relocation |
Definition at line 60 of file X86SuppressAPXForReloc.cpp.
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) | |||
) |