|
LLVM 24.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/RegisterClassInfo.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 (X86SuppressAPXForRelocationLegacy, DEBUG_TYPE, "X86 Suppress APX features for relocation", false, false) INITIALIZE_PASS_END(X86SuppressAPXForRelocationLegacy | |
| 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) |
| static bool | suppressAPXForRelocation (MachineFunction &MF) |
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 33 of file X86SuppressAPXForReloc.cpp.
|
static |
Definition at line 103 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, and suppressEGPRRegClassInRegAndUses().
Referenced by suppressAPXForRelocation().
|
static |
Definition at line 167 of file X86SuppressAPXForReloc.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::X86::AddrDisp, llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), 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, Reg, llvm::MachineOperand::setIsDead(), suppressEGPRRegClassInRegAndUses(), and TII.
Referenced by suppressAPXForRelocation().
| INITIALIZE_PASS_BEGIN | ( | X86SuppressAPXForRelocationLegacy | , |
| DEBUG_TYPE | , | ||
| "X86 Suppress APX features for relocation" | , | ||
| false | , | ||
| false | ) |
References DEBUG_TYPE.
|
static |
Definition at line 252 of file X86SuppressAPXForReloc.cpp.
References Changed, llvm::MachineFunction::getSubtarget(), handleInstructionWithEGPR(), handleNDDOrNFInstructions(), and X86EnableAPXForRelocation.
Referenced by llvm::X86SuppressAPXForRelocationPass::run().
|
static |
Definition at line 72 of file X86SuppressAPXForReloc.cpp.
References assert(), llvm::X86RegisterInfo::constrainRegClassToNonRex2(), llvm::MachineRegisterInfo::getRegClass(), llvm::X86II::isApxExtendedReg(), MI, Reg, and llvm::MachineRegisterInfo::setRegClass().
Referenced by suppressEGPRRegClassInRegAndUses().
|
static |
Definition at line 92 of file X86SuppressAPXForReloc.cpp.
References MI, Reg, suppressEGPRRegClass(), and llvm::MachineRegisterInfo::use_instructions().
Referenced by handleInstructionWithEGPR(), and handleNDDOrNFInstructions().
| DEBUG_TYPE |
Definition at line 65 of file X86SuppressAPXForReloc.cpp.
| X86 Suppress APX features for false |
Definition at line 66 of file X86SuppressAPXForReloc.cpp.
| X86 Suppress APX features for relocation |
Definition at line 66 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) | ) |