LLVM  14.0.0git
Macros | Functions | Variables
SILoadStoreOptimizer.cpp File Reference
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/InitializePasses.h"
Include dependency graph for SILoadStoreOptimizer.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "si-load-store-opt"
 

Functions

 INITIALIZE_PASS_BEGIN (SILoadStoreOptimizer, DEBUG_TYPE, "SI Load Store Optimizer", false, false) INITIALIZE_PASS_END(SILoadStoreOptimizer
 
static void moveInstsAfter (MachineBasicBlock::iterator I, ArrayRef< MachineInstr * > InstsToMove)
 
static void addDefsUsesToList (const MachineInstr &MI, DenseSet< Register > &RegDefs, DenseSet< Register > &PhysRegUses)
 
static bool memAccessesCanBeReordered (MachineBasicBlock::iterator A, MachineBasicBlock::iterator B, AliasAnalysis *AA)
 
static bool addToListsIfDependent (MachineInstr &MI, DenseSet< Register > &RegDefs, DenseSet< Register > &PhysRegUses, SmallVectorImpl< MachineInstr * > &Insts)
 
static bool canMoveInstsAcrossMemOp (MachineInstr &MemOp, ArrayRef< MachineInstr * > InstsToMove, AliasAnalysis *AA)
 
static MachineMemOperandcombineKnownAdjacentMMOs (MachineFunction &MF, const MachineMemOperand *A, const MachineMemOperand *B)
 
static unsigned getBufferFormatWithCompCount (unsigned OldFormat, unsigned ComponentCount, const GCNSubtarget &STI)
 
static uint32_t mostAlignedValueInRange (uint32_t Lo, uint32_t Hi)
 

Variables

 DEBUG_TYPE
 
SI Load Store Optimizer
 
SI Load Store false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "si-load-store-opt"

Definition at line 69 of file SILoadStoreOptimizer.cpp.

Function Documentation

◆ addDefsUsesToList()

static void addDefsUsesToList ( const MachineInstr MI,
DenseSet< Register > &  RegDefs,
DenseSet< Register > &  PhysRegUses 
)
static

◆ addToListsIfDependent()

static bool addToListsIfDependent ( MachineInstr MI,
DenseSet< Register > &  RegDefs,
DenseSet< Register > &  PhysRegUses,
SmallVectorImpl< MachineInstr * > &  Insts 
)
static

◆ canMoveInstsAcrossMemOp()

static bool canMoveInstsAcrossMemOp ( MachineInstr MemOp,
ArrayRef< MachineInstr * >  InstsToMove,
AliasAnalysis AA 
)
static

Definition at line 640 of file SILoadStoreOptimizer.cpp.

References assert(), and memAccessesCanBeReordered().

◆ combineKnownAdjacentMMOs()

static MachineMemOperand* combineKnownAdjacentMMOs ( MachineFunction MF,
const MachineMemOperand A,
const MachineMemOperand B 
)
static

◆ getBufferFormatWithCompCount()

static unsigned getBufferFormatWithCompCount ( unsigned  OldFormat,
unsigned  ComponentCount,
const GCNSubtarget STI 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( SILoadStoreOptimizer  ,
DEBUG_TYPE  ,
"SI Load Store Optimizer ,
false  ,
false   
)

◆ memAccessesCanBeReordered()

static bool memAccessesCanBeReordered ( MachineBasicBlock::iterator  A,
MachineBasicBlock::iterator  B,
AliasAnalysis AA 
)
static

Definition at line 604 of file SILoadStoreOptimizer.cpp.

References B.

Referenced by canMoveInstsAcrossMemOp().

◆ mostAlignedValueInRange()

static uint32_t mostAlignedValueInRange ( uint32_t  Lo,
uint32_t  Hi 
)
static

◆ moveInstsAfter()

static void moveInstsAfter ( MachineBasicBlock::iterator  I,
ArrayRef< MachineInstr * >  InstsToMove 
)
static

Definition at line 581 of file SILoadStoreOptimizer.cpp.

References I, llvm::MachineBasicBlock::insert(), MBB, and MI.

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 570 of file SILoadStoreOptimizer.cpp.

◆ false

SI Load Store false

Definition at line 571 of file SILoadStoreOptimizer.cpp.

◆ Optimizer

SI Load Store Optimizer

Definition at line 570 of file SILoadStoreOptimizer.cpp.