Add long branch expansion pass for MIPS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158433 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka 2012-06-14 01:19:35 +00:00
parent 91625aab60
commit 9e97587e02
2 changed files with 8 additions and 1 deletions

View File

@ -24,6 +24,7 @@ namespace llvm {
FunctionPass *createMipsISelDag(MipsTargetMachine &TM);
FunctionPass *createMipsDelaySlotFillerPass(MipsTargetMachine &TM);
FunctionPass *createMipsLongBranchPass(MipsTargetMachine &TM);
FunctionPass *createMipsJITCodeEmitterPass(MipsTargetMachine &TM,
JITCodeEmitter &JCE);

View File

@ -124,7 +124,13 @@ bool MipsPassConfig::addInstSelector() {
// machine code is emitted. return true if -print-machineinstrs should
// print out the code after the passes.
bool MipsPassConfig::addPreEmitPass() {
PM->add(createMipsDelaySlotFillerPass(getMipsTargetMachine()));
MipsTargetMachine &TM = getMipsTargetMachine();
PM->add(createMipsDelaySlotFillerPass(TM));
// NOTE: long branch has not been implemented for mips16.
if (TM.getSubtarget<MipsSubtarget>().hasStandardEncoding())
PM->add(createMipsLongBranchPass(TM));
return true;
}