LLVM: lib/CodeGen/GlobalISel/LoadStoreOpt.cpp File Reference (original) (raw)
This file implements the LoadStoreOpt optimization pass. More...
Go to the source code of this file.
Functions | |
---|---|
STATISTIC (NumStoresMerged, "Number of stores merged") | |
INITIALIZE_PASS_BEGIN (LoadStoreOpt, DEBUG_TYPE, "Generic memory optimizations", false, false) INITIALIZE_PASS_END(LoadStoreOpt | |
static bool | isInstHardMergeHazard (MachineInstr &MI) |
Returns true if the instruction creates an unavoidable hazard that forces a boundary between store merge candidates. | |
static std::optional< int64_t > | getTruncStoreByteOffset (GStore &Store, Register &SrcVal, MachineRegisterInfo &MRI) |
Check if the store Store is a truncstore that can be merged. | |
Variables | |
---|---|
const unsigned | MaxStoreSizeToForm = 128 |
DEBUG_TYPE | |
Generic memory | optimizations |
Generic memory | false |
This file implements the LoadStoreOpt optimization pass.
Definition in file LoadStoreOpt.cpp.
◆ DEBUG_TYPE
#define DEBUG_TYPE "loadstore-opt"
◆ getTruncStoreByteOffset()
Check if the store Store
is a truncstore that can be merged.
That is, it's a store of a shifted value of SrcVal
. If SrcVal
is an empty Register then it does not need to match and SrcVal is set to the source value found. On match, returns the start byte offset of the SrcVal
that is being stored.
Definition at line 649 of file LoadStoreOpt.cpp.
References llvm::Register::isValid(), llvm::MIPatternMatch::m_any_of(), llvm::MIPatternMatch::m_GAShr(), llvm::MIPatternMatch::m_GLShr(), llvm::MIPatternMatch::m_GTrunc(), llvm::MIPatternMatch::m_ICst(), llvm::MIPatternMatch::m_Reg(), llvm::MIPatternMatch::mi_match(), MRI, and llvm::Offset.
◆ INITIALIZE_PASS_BEGIN()
◆ isInstHardMergeHazard()
Returns true if the instruction creates an unavoidable hazard that forces a boundary between store merge candidates.
Definition at line 300 of file LoadStoreOpt.cpp.
References MI.
◆ STATISTIC()
STATISTIC | ( | NumStoresMerged | , |
---|---|---|---|
"Number of stores merged" | |||
) |