LLVM 22.0.0git
X86AvoidStoreForwardingBlocks.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "x86-avoid-sfb"

Functions

 INITIALIZE_PASS_BEGIN (X86AvoidSFBLegacy, DEBUG_TYPE, "Machine code sinking", false, false) INITIALIZE_PASS_END(X86AvoidSFBLegacy
static bool isXMMLoadOpcode (unsigned Opcode)
static bool isYMMLoadOpcode (unsigned Opcode)
static bool isPotentialBlockedMemCpyLd (unsigned Opcode)
static bool isPotentialBlockedMemCpyPair (unsigned LdOpcode, unsigned StOpcode)
static bool isPotentialBlockingStoreInst (unsigned Opcode, unsigned LoadOpcode)
static unsigned getYMMtoXMMLoadOpcode (unsigned LoadOpcode)
static unsigned getYMMtoXMMStoreOpcode (unsigned StoreOpcode)
static int getAddrOffset (const MachineInstr *MI)
static MachineOperandgetBaseOperand (MachineInstr *MI)
static MachineOperandgetDispOperand (MachineInstr *MI)
static bool isRelevantAddressingMode (MachineInstr *MI)
static SmallVector< MachineInstr *, 2 > findPotentialBlockers (MachineInstr *LoadInst)
static void updateKillStatus (MachineInstr *LoadInst, MachineInstr *StoreInst)
static bool hasSameBaseOpValue (MachineInstr *LoadInst, MachineInstr *StoreInst)
static bool isBlockingStore (int64_t LoadDispImm, unsigned LoadSize, int64_t StoreDispImm, unsigned StoreSize)
static void updateBlockingStoresDispSizeMap (DisplacementSizeMap &BlockingStoresDispSizeMap, int64_t DispImm, unsigned Size)
static void removeRedundantBlockingStores (DisplacementSizeMap &BlockingStoresDispSizeMap)

Variables

static cl::opt< boolDisableX86AvoidStoreForwardBlocks ("x86-disable-avoid-SFB", cl::Hidden, cl::desc("X86: Disable Store Forwarding Blocks fixup."), cl::init(false))
static cl::opt< unsignedX86AvoidSFBInspectionLimit ("x86-sfb-inspection-limit", cl::desc("X86: Number of instructions backward to " "inspect for store forwarding blocks."), cl::init(20), cl::Hidden)
 DEBUG_TYPE
Machine code sinking
Machine code false
static const int MOV128SZ = 16
static const int MOV64SZ = 8
static const int MOV32SZ = 4
static const int MOV16SZ = 2
static const int MOV8SZ = 1

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "x86-avoid-sfb"

Definition at line 54 of file X86AvoidStoreForwardingBlocks.cpp.

Function Documentation

◆ findPotentialBlockers()

◆ getAddrOffset()

◆ getBaseOperand()

MachineOperand & getBaseOperand ( MachineInstr * MI)
static

◆ getDispOperand()

MachineOperand & getDispOperand ( MachineInstr * MI)
static

Definition at line 309 of file X86AvoidStoreForwardingBlocks.cpp.

References llvm::X86::AddrDisp, getAddrOffset(), and MI.

Referenced by isRelevantAddressingMode().

◆ getYMMtoXMMLoadOpcode()

unsigned getYMMtoXMMLoadOpcode ( unsigned LoadOpcode)
static

Definition at line 238 of file X86AvoidStoreForwardingBlocks.cpp.

References llvm_unreachable.

◆ getYMMtoXMMStoreOpcode()

unsigned getYMMtoXMMStoreOpcode ( unsigned StoreOpcode)
static

Definition at line 267 of file X86AvoidStoreForwardingBlocks.cpp.

References llvm_unreachable.

◆ hasSameBaseOpValue()

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( X86AvoidSFBLegacy ,
DEBUG_TYPE ,
"Machine code sinking" ,
false ,
false  )

◆ isBlockingStore()

bool isBlockingStore ( int64_t LoadDispImm,
unsigned LoadSize,
int64_t StoreDispImm,
unsigned StoreSize )
static

Definition at line 623 of file X86AvoidStoreForwardingBlocks.cpp.

◆ isPotentialBlockedMemCpyLd()

bool isPotentialBlockedMemCpyLd ( unsigned Opcode)
static

Definition at line 158 of file X86AvoidStoreForwardingBlocks.cpp.

References isXMMLoadOpcode(), and isYMMLoadOpcode().

◆ isPotentialBlockedMemCpyPair()

bool isPotentialBlockedMemCpyPair ( unsigned LdOpcode,
unsigned StOpcode )
static

Definition at line 162 of file X86AvoidStoreForwardingBlocks.cpp.

◆ isPotentialBlockingStoreInst()

bool isPotentialBlockingStoreInst ( unsigned Opcode,
unsigned LoadOpcode )
static

Definition at line 214 of file X86AvoidStoreForwardingBlocks.cpp.

References isYMMLoadOpcode().

◆ isRelevantAddressingMode()

◆ isXMMLoadOpcode()

bool isXMMLoadOpcode ( unsigned Opcode)
static

Definition at line 138 of file X86AvoidStoreForwardingBlocks.cpp.

Referenced by isPotentialBlockedMemCpyLd().

◆ isYMMLoadOpcode()

bool isYMMLoadOpcode ( unsigned Opcode)
static

◆ removeRedundantBlockingStores()

◆ updateBlockingStoresDispSizeMap()

void updateBlockingStoresDispSizeMap ( DisplacementSizeMap & BlockingStoresDispSizeMap,
int64_t DispImm,
unsigned Size )
static

Definition at line 631 of file X86AvoidStoreForwardingBlocks.cpp.

References Size.

◆ updateKillStatus()

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 131 of file X86AvoidStoreForwardingBlocks.cpp.

◆ DisableX86AvoidStoreForwardBlocks

cl::opt< bool > DisableX86AvoidStoreForwardBlocks("x86-disable-avoid-SFB", cl::Hidden, cl::desc("X86: Disable Store Forwarding Blocks fixup."), cl::init(false)) ( "x86-disable-avoid-SFB" ,
cl::Hidden ,
cl::desc("X86: Disable Store Forwarding Blocks fixup.") ,
cl::init(false)  )
static

◆ false

Machine code false

Definition at line 132 of file X86AvoidStoreForwardingBlocks.cpp.

◆ MOV128SZ

const int MOV128SZ = 16
static

Definition at line 232 of file X86AvoidStoreForwardingBlocks.cpp.

◆ MOV16SZ

const int MOV16SZ = 2
static

Definition at line 235 of file X86AvoidStoreForwardingBlocks.cpp.

◆ MOV32SZ

const int MOV32SZ = 4
static

Definition at line 234 of file X86AvoidStoreForwardingBlocks.cpp.

◆ MOV64SZ

const int MOV64SZ = 8
static

Definition at line 233 of file X86AvoidStoreForwardingBlocks.cpp.

◆ MOV8SZ

const int MOV8SZ = 1
static

Definition at line 236 of file X86AvoidStoreForwardingBlocks.cpp.

◆ sinking

Machine code sinking

Definition at line 131 of file X86AvoidStoreForwardingBlocks.cpp.

◆ X86AvoidSFBInspectionLimit

cl::opt< unsigned > X86AvoidSFBInspectionLimit("x86-sfb-inspection-limit", cl::desc("X86: Number of instructions backward to " "inspect for store forwarding blocks."), cl::init(20), cl::Hidden) ( "x86-sfb-inspection-limit" ,
cl::desc("X86: Number of instructions backward to " "inspect for store forwarding blocks.") ,
cl::init(20) ,
cl::Hidden  )
static

Referenced by findPotentialBlockers().