diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-10-07 19:06:57 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-10-07 19:06:57 +0000 |
commit | 96ba8cb9b2b1087abeaaf1ede246b56ee788028b (patch) | |
tree | fe0c660f7f014371b496bb122558523131b4fae5 /lib/Target/Mips | |
parent | 23eb90714bb6a5a7d94a262f439b5bf872733cf1 (diff) | |
download | external_llvm-96ba8cb9b2b1087abeaaf1ede246b56ee788028b.zip external_llvm-96ba8cb9b2b1087abeaaf1ede246b56ee788028b.tar.gz external_llvm-96ba8cb9b2b1087abeaaf1ede246b56ee788028b.tar.bz2 |
[mips] Define method MipsSubtarget::enableLongBranchPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r-- | lib/Target/Mips/MipsSubtarget.h | 4 | ||||
-rw-r--r-- | lib/Target/Mips/MipsTargetMachine.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsSubtarget.h b/lib/Target/Mips/MipsSubtarget.h index 140ddde..1d99404 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 f25afe3..06f78e0 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<MipsSubtarget>(); addPass(createMipsDelaySlotFillerPass(TM)); - if (Subtarget.hasStandardEncoding() || - Subtarget.allowMixed16_32()) + if (Subtarget.enableLongBranchPass()) addPass(createMipsLongBranchPass(TM)); if (Subtarget.inMips16Mode() || Subtarget.allowMixed16_32()) |