forked from OSchip/llvm-project
[mips] Initialize the long branch pass for testing purposes
llvm-svn: 332172
This commit is contained in:
parent
5e9dd3174d
commit
65cc0cb31f
|
@ -43,6 +43,7 @@ namespace llvm {
|
|||
MipsRegisterBankInfo &);
|
||||
|
||||
void initializeMipsDelaySlotFillerPass(PassRegistry &);
|
||||
void initializeMipsLongBranchPass(PassRegistry &);
|
||||
} // end namespace llvm;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -77,8 +77,9 @@ namespace {
|
|||
public:
|
||||
static char ID;
|
||||
|
||||
MipsLongBranch()
|
||||
: MachineFunctionPass(ID), ABI(MipsABIInfo::Unknown()) {}
|
||||
MipsLongBranch() : MachineFunctionPass(ID), ABI(MipsABIInfo::Unknown()) {
|
||||
initializeMipsLongBranchPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
StringRef getPassName() const override { return "Mips Long Branch"; }
|
||||
|
||||
|
@ -108,6 +109,9 @@ namespace {
|
|||
|
||||
char MipsLongBranch::ID = 0;
|
||||
|
||||
INITIALIZE_PASS(MipsLongBranch, DEBUG_TYPE,
|
||||
"Expand out of range branch instructions", false, false)
|
||||
|
||||
/// Iterate over list of Br's operands and search for a MachineBasicBlock
|
||||
/// operand.
|
||||
static MachineBasicBlock *getTargetMBB(const MachineInstr &Br) {
|
||||
|
|
|
@ -54,6 +54,7 @@ extern "C" void LLVMInitializeMipsTarget() {
|
|||
PassRegistry *PR = PassRegistry::getPassRegistry();
|
||||
initializeGlobalISel(*PR);
|
||||
initializeMipsDelaySlotFillerPass(*PR);
|
||||
initializeMipsLongBranchPass(*PR);
|
||||
}
|
||||
|
||||
static std::string computeDataLayout(const Triple &TT, StringRef CPU,
|
||||
|
|
Loading…
Reference in New Issue