Go to the documentation of this file.
23 #define DEBUG_TYPE "mips-prelegalizer-combiner"
28 class MipsPreLegalizerCombinerInfo :
public CombinerInfo {
30 MipsPreLegalizerCombinerInfo()
43 switch (
MI.getOpcode()) {
46 case TargetOpcode::G_MEMCPY_INLINE:
48 case TargetOpcode::G_LOAD:
49 case TargetOpcode::G_SEXTLOAD:
50 case TargetOpcode::G_ZEXTLOAD: {
53 auto MMO = *
MI.memoperands_begin();
57 bool isUnaligned = MMO->getAlign() < MMO->getSize();
75 MipsPreLegalizerCombiner();
77 StringRef getPassName()
const override {
return "MipsPreLegalizerCombiner"; }
85 void MipsPreLegalizerCombiner::getAnalysisUsage(
AnalysisUsage &AU)
const {
96 bool MipsPreLegalizerCombiner::runOnMachineFunction(
MachineFunction &MF) {
98 MachineFunctionProperties::Property::FailedISel))
100 auto *TPC = &getAnalysis<TargetPassConfig>();
101 MipsPreLegalizerCombinerInfo PCInfo;
103 return C.combineMachineInstrs(MF,
nullptr);
108 "Combine Mips machine instrs before legalization",
false,
117 return new MipsPreLegalizerCombiner();
bool hasProperty(Property P) const
This is an optimization pass for GlobalISel generic memory operations.
bool systemSupportsUnalignedAccess() const
Does the system support unaligned memory access.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getSelectionDAGFallbackAnalysisUsage(AnalysisUsage &AU)
Modify analysis usage so it preserves passes required for the SelectionDAG fallback.
bool tryCombineExtendingLoads(MachineInstr &MI)
If MI is extend that consumes the result of a load, try to combine it.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
(vector float) vec_cmpeq(*A, *B) C
Represent the analysis usage information of a pass.
const MachineFunctionProperties & getProperties() const
Get the function properties.
FunctionPass * createMipsPreLegalizeCombiner()
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
INITIALIZE_PASS_BEGIN(MipsPreLegalizerCombiner, DEBUG_TYPE, "Combine Mips machine instrs before legalization", false, false) INITIALIZE_PASS_END(MipsPreLegalizerCombiner
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Target-Independent Code Generator Pass Configuration Options.
Helper class to build MachineInstr.
Representation of each machine instruction.
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
Combine Mips machine instrs before legalization
void setPreservesCFG()
This function should be called by the pass, iff they do not:
StringRef - Represent a constant reference to a string, i.e.
Abstract class that contains various methods for clients to notify about changes.
bool tryEmitMemcpyInline(MachineInstr &MI)
Emit loads and stores that perform the given memcpy.
void initializeMipsPreLegalizerCombinerPass(PassRegistry &)
FunctionPass class - This class is used to implement most global optimizations.
AnalysisUsage & addRequired()
constexpr bool isPowerOf2_64(uint64_t Value)
Return true if the argument is a power of two > 0 (64 bit edition.)