#include "MipsLegalizerInfo.h"
#include "MipsTargetMachine.h"
#include "llvm/CodeGen/GlobalISel/Combiner.h"
#include "llvm/CodeGen/GlobalISel/CombinerHelper.h"
#include "llvm/CodeGen/GlobalISel/CombinerInfo.h"
#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/InitializePasses.h"
#define DEBUG_TYPE …
usingnamespacellvm;
namespace {
struct MipsPreLegalizerCombinerInfo : public CombinerInfo { … };
class MipsPreLegalizerCombinerImpl : public Combiner { … };
class MipsPreLegalizerCombiner : public MachineFunctionPass { … };
}
void MipsPreLegalizerCombiner::getAnalysisUsage(AnalysisUsage &AU) const { … }
MipsPreLegalizerCombiner::MipsPreLegalizerCombiner() : … { … }
bool MipsPreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) { … }
char MipsPreLegalizerCombiner::ID = …;
INITIALIZE_PASS_BEGIN(MipsPreLegalizerCombiner, DEBUG_TYPE,
"Combine Mips machine instrs before legalization", false,
false)
INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
INITIALIZE_PASS_DEPENDENCY(GISelKnownBitsAnalysis)
INITIALIZE_PASS_END(MipsPreLegalizerCombiner, DEBUG_TYPE,
"Combine Mips machine instrs before legalization", false,
false)
namespace llvm {
FunctionPass *createMipsPreLegalizeCombiner() { … }
}