From: Akira Hatanaka Date: Mon, 7 Oct 2013 19:06:57 +0000 (+0000) Subject: [mips] Define method MipsSubtarget::enableLongBranchPass. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=96ba8cb9b2b1087abeaaf1ede246b56ee788028b;p=oota-llvm.git [mips] Define method MipsSubtarget::enableLongBranchPass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192122 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Mips/MipsSubtarget.h b/lib/Target/Mips/MipsSubtarget.h index 140ddde045b..1d9940408a6 100644 --- a/lib/Target/Mips/MipsSubtarget.h +++ b/lib/Target/Mips/MipsSubtarget.h @@ -194,6 +194,10 @@ public: bool mipsSEUsesSoftFloat() const; + bool enableLongBranchPass() const { + return hasStandardEncoding() || allowMixed16_32(); + } + /// Features related to the presence of specific instructions. bool hasSEInReg() const { return HasSEInReg; } bool hasCondMov() const { return HasCondMov; } diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index f25afe33ff9..06f78e0ab36 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/lib/Target/Mips/MipsTargetMachine.cpp @@ -197,8 +197,7 @@ bool MipsPassConfig::addPreEmitPass() { const MipsSubtarget &Subtarget = TM.getSubtarget(); addPass(createMipsDelaySlotFillerPass(TM)); - if (Subtarget.hasStandardEncoding() || - Subtarget.allowMixed16_32()) + if (Subtarget.enableLongBranchPass()) addPass(createMipsLongBranchPass(TM)); if (Subtarget.inMips16Mode() || Subtarget.allowMixed16_32())