[mips] Define method MipsSubtarget::enableLongBranchPass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka 2013-10-07 19:06:57 +00:00
parent 23eb90714b
commit 96ba8cb9b2
2 changed files with 5 additions and 2 deletions

View File

@ -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; }

View File

@ -197,8 +197,7 @@ bool MipsPassConfig::addPreEmitPass() {
const MipsSubtarget &Subtarget = TM.getSubtarget<MipsSubtarget>();
addPass(createMipsDelaySlotFillerPass(TM));
if (Subtarget.hasStandardEncoding() ||
Subtarget.allowMixed16_32())
if (Subtarget.enableLongBranchPass())
addPass(createMipsLongBranchPass(TM));
if (Subtarget.inMips16Mode() ||
Subtarget.allowMixed16_32())