Go to the documentation of this file.
14 #ifndef LLVM_CODEGEN_GLOBALISEL_LOADSTOREOPT_H
15 #define LLVM_CODEGEN_GLOBALISEL_LOADSTOREOPT_H
29 class MachineBasicBlock;
33 class MachineRegisterInfo;
34 namespace GISelAddressing {
60 using namespace GISelAddressing;
82 class StoreMergeCandidate {
106 PotentialAliases.
clear();
107 CurrentLowestOffset = 0;
112 bool isLegalOrBeforeLegalizer(
const LegalityQuery &Query,
113 MachineFunction &MF)
const;
116 bool addStoreToCandidate(GStore &
MI, StoreMergeCandidate &
C);
119 bool operationAliasesWithCandidate(MachineInstr &
MI, StoreMergeCandidate &
C);
124 bool mergeStores(SmallVectorImpl<GStore *> &StoresToMerge);
129 bool doSingleStoreMerge(SmallVectorImpl<GStore *> &Stores);
130 bool processMergeCandidate(StoreMergeCandidate &
C);
131 bool mergeBlockStores(MachineBasicBlock &
MBB);
132 bool mergeFunctionStores(MachineFunction &MF);
137 void initializeStoreMergeTargetInfo(
unsigned AddrSpace = 0);
142 DenseMap<unsigned, BitVector> LegalStoreSizes;
145 SmallSet<MachineInstr *, 16> InstsToErase;
Helper struct to store a base, index and offset that forms an address.
This is an optimization pass for GlobalISel generic memory operations.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
BaseIndexOffset getPointerInfo(Register Ptr, MachineRegisterInfo &MRI)
Returns a BaseIndexOffset which describes the pointer in Ptr.
Properties which a MachineFunction may have at a given point in time.
MachineFunctionProperties getRequiredProperties() const override
(vector float) vec_cmpeq(*A, *B) C
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
Represent the analysis usage information of a pass.
MachineFunctionProperties & set(Property P)
Helper class to build MachineInstr.
Representation of each machine instruction.
initializer< Ty > init(const Ty &Val)
print Print MemDeps of function
StringRef - Represent a constant reference to a string, i.e.
bool instMayAlias(const MachineInstr &MI, const MachineInstr &Other, MachineRegisterInfo &MRI, AliasAnalysis *AA)
Returns true if the instruction MI may alias Other.
unsigned const MachineRegisterInfo * MRI
Wrapper class representing virtual and physical registers.
bool aliasIsKnownForLoadStore(const MachineInstr &MI1, const MachineInstr &MI2, bool &IsAlias, MachineRegisterInfo &MRI)
Compute whether or not a memory access at MI1 aliases with an access at MI2.