LLVM 22.0.0git
Macros | Functions | Variables
X86SuppressAPXForReloc.cpp File Reference

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< boolX86EnableAPXForRelocation ("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
 

Detailed Description

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.

Macro Definition Documentation

◆ DEBUG_TYPE

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

Definition at line 32 of file X86SuppressAPXForReloc.cpp.

Function Documentation

◆ handleInstructionWithEGPR()

static bool handleInstructionWithEGPR ( MachineFunction MF,
const X86Subtarget ST 
)
static

◆ handleNDDOrNFInstructions()

static bool handleNDDOrNFInstructions ( MachineFunction MF,
const X86Subtarget ST 
)
static

◆ INITIALIZE_PASS_BEGIN()

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

◆ suppressEGPRRegClass()

static void suppressEGPRRegClass ( MachineRegisterInfo MRI,
MachineInstr MI,
const X86Subtarget ST,
unsigned int  OpNum 
)
static

◆ suppressEGPRRegClassInRegAndUses()

static void suppressEGPRRegClassInRegAndUses ( MachineRegisterInfo MRI,
MachineInstr MI,
const X86Subtarget ST,
unsigned int  OpNum 
)
static

Definition at line 86 of file X86SuppressAPXForReloc.cpp.

References MI, MRI, and suppressEGPRRegClass().

Referenced by handleInstructionWithEGPR(), and handleNDDOrNFInstructions().

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 59 of file X86SuppressAPXForReloc.cpp.

◆ false

X86 Suppress APX features for false

Definition at line 60 of file X86SuppressAPXForReloc.cpp.

◆ relocation

X86 Suppress APX features for relocation

Definition at line 60 of file X86SuppressAPXForReloc.cpp.

◆ 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)   
)