diff options
author | Eric Christopher <echristo@gmail.com> | 2014-07-18 20:29:02 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-07-18 20:29:02 +0000 |
commit | a08db01b35570a04b9e753ce2b7c28a98b3ca4fa (patch) | |
tree | 11e802210a8d03bf0f3fc980af88a040def732df /llvm/lib/Target/Mips/MipsTargetMachine.cpp | |
parent | f4f1cff4ba8c87fcfb701d5cfcb87df021747b5a (diff) | |
download | llvm-a08db01b35570a04b9e753ce2b7c28a98b3ca4fa.zip llvm-a08db01b35570a04b9e753ce2b7c28a98b3ca4fa.tar.gz llvm-a08db01b35570a04b9e753ce2b7c28a98b3ca4fa.tar.bz2 |
Make non-module passes unconditionally added in the pass
manager for mips, and early exit if we don't want to do
anything because of the current subtarget.
llvm-svn: 213407
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsTargetMachine.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetMachine.cpp b/llvm/lib/Target/Mips/MipsTargetMachine.cpp index 425dbf1..ed0152f 100644 --- a/llvm/lib/Target/Mips/MipsTargetMachine.cpp +++ b/llvm/lib/Target/Mips/MipsTargetMachine.cpp @@ -124,13 +124,9 @@ void MipsPassConfig::addIRPasses() { // Install an instruction selector pass using // the ISelDag to gen Mips code. bool MipsPassConfig::addInstSelector() { - if (getMipsSubtarget().allowMixed16_32()) { - addPass(createMipsModuleISelDag(getMipsTargetMachine())); - addPass(createMips16ISelDag(getMipsTargetMachine())); - addPass(createMipsSEISelDag(getMipsTargetMachine())); - } else { - addPass(createMipsISelDag(getMipsTargetMachine())); - } + addPass(createMipsModuleISelDag(getMipsTargetMachine())); + addPass(createMips16ISelDag(getMipsTargetMachine())); + addPass(createMipsSEISelDag(getMipsTargetMachine())); return false; } @@ -166,15 +162,9 @@ void MipsTargetMachine::addAnalysisPasses(PassManagerBase &PM) { // print out the code after the passes. bool MipsPassConfig::addPreEmitPass() { MipsTargetMachine &TM = getMipsTargetMachine(); - const MipsSubtarget &Subtarget = TM.getSubtarget<MipsSubtarget>(); addPass(createMipsDelaySlotFillerPass(TM)); - - if (Subtarget.enableLongBranchPass()) - addPass(createMipsLongBranchPass(TM)); - if (Subtarget.inMips16Mode() || - Subtarget.allowMixed16_32()) - addPass(createMipsConstantIslandPass(TM)); - + addPass(createMipsLongBranchPass(TM)); + addPass(createMipsConstantIslandPass(TM)); return true; } |