Go to the documentation of this file.
27 #define DEBUG_TYPE "mips-postlegalizer-combiner"
30 using namespace MIPatternMatch;
32 #define MIPSPOSTLEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_DEPS
33 #include "MipsGenPostLegalizeGICombiner.inc"
34 #undef MIPSPOSTLEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_DEPS
37 #define MIPSPOSTLEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_H
38 #include "MipsGenPostLegalizeGICombiner.inc"
39 #undef MIPSPOSTLEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_H
41 class MipsPostLegalizerCombinerInfo final :
public CombinerInfo {
45 MipsGenPostLegalizerCombinerHelperRuleConfig GeneratedRuleCfg;
47 MipsPostLegalizerCombinerInfo(
bool EnableOpt,
bool OptSize,
bool MinSize,
50 LI, EnableOpt, OptSize, MinSize),
52 if (!GeneratedRuleCfg.parseCommandLineOption())
66 MipsGenPostLegalizerCombinerHelper Generated(GeneratedRuleCfg, Helper);
67 return Generated.tryCombineAll(Observer,
MI,
B, Helper);
70 #define MIPSPOSTLEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_CPP
71 #include "MipsGenPostLegalizeGICombiner.inc"
72 #undef MIPSPOSTLEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_CPP
81 MipsPostLegalizerCombiner(
bool IsOptNone =
false);
84 return "MipsPostLegalizerCombiner";
96 void MipsPostLegalizerCombiner::getAnalysisUsage(
AnalysisUsage &AU)
const {
109 MipsPostLegalizerCombiner::MipsPostLegalizerCombiner(
bool IsOptNone)
114 bool MipsPostLegalizerCombiner::runOnMachineFunction(
MachineFunction &MF) {
116 MachineFunctionProperties::Property::FailedISel))
118 auto *TPC = &getAnalysis<TargetPassConfig>();
127 GISelKnownBits *KB = &getAnalysis<GISelKnownBitsAnalysis>().get(MF);
128 MipsPostLegalizerCombinerInfo PCInfo(EnableOpt,
F.hasOptSize(),
129 F.hasMinSize(), KB, LI);
131 return C.combineMachineInstrs(MF,
nullptr);
136 "Combine Mips machine instrs after legalization",
false,
146 return new MipsPostLegalizerCombiner(IsOptNone);
CodeGenOpt::Level getOptLevel() const
Returns the optimization level: None, Less, Default, or Aggressive.
bool hasProperty(Property P) const
This is an optimization pass for GlobalISel generic memory operations.
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.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
FunctionPass * createMipsPostLegalizeCombiner(bool IsOptNone)
To use KnownBitsInfo analysis in a pass, KnownBitsInfo &Info = getAnalysis<GISelKnownBitsInfoAnalysis...
(vector float) vec_cmpeq(*A, *B) C
Represent the analysis usage information of a pass.
const MachineFunctionProperties & getProperties() const
Get the function properties.
INITIALIZE_PASS_BEGIN(MipsPostLegalizerCombiner, DEBUG_TYPE, "Combine Mips machine instrs after legalization", false, false) INITIALIZE_PASS_END(MipsPostLegalizerCombiner
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
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.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
Helper class to build MachineInstr.
Representation of each machine instruction.
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
void setPreservesCFG()
This function should be called by the pass, iff they do not:
StringRef - Represent a constant reference to a string, i.e.
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
Abstract class that contains various methods for clients to notify about changes.
Function & getFunction()
Return the LLVM function that this machine code represents.
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
This class provides legalization strategies.
FunctionPass class - This class is used to implement most global optimizations.
AnalysisUsage & addRequired()
Combine Mips machine instrs after legalization
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
void initializeMipsPostLegalizerCombinerPass(PassRegistry &)