summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsTargetMachine.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-07-02 19:48:31 +0000
committerBob Wilson <bob.wilson@apple.com>2012-07-02 19:48:31 +0000
commit564fbf6aff8fb95646a1290078a37c2d4dbe629f (patch)
treebf0ceba3cdf8f6171a6657f40aa43ba7c664d734 /lib/Target/Mips/MipsTargetMachine.cpp
parent8add7b48d2c548299d9d590ad048ca1637b170c6 (diff)
downloadllvm-564fbf6aff8fb95646a1290078a37c2d4dbe629f.tar.gz
llvm-564fbf6aff8fb95646a1290078a37c2d4dbe629f.tar.bz2
llvm-564fbf6aff8fb95646a1290078a37c2d4dbe629f.tar.xz
Add all codegen passes to the PassManager via TargetPassConfig.
This is a preliminary step toward having TargetPassConfig be able to start and stop the compilation at specified passes for unit testing and debugging. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r--lib/Target/Mips/MipsTargetMachine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp
index b03baa81f2..dd5d35f10d 100644
--- a/lib/Target/Mips/MipsTargetMachine.cpp
+++ b/lib/Target/Mips/MipsTargetMachine.cpp
@@ -116,7 +116,7 @@ TargetPassConfig *MipsTargetMachine::createPassConfig(PassManagerBase &PM) {
// Install an instruction selector pass using
// the ISelDag to gen Mips code.
bool MipsPassConfig::addInstSelector() {
- PM->add(createMipsISelDag(getMipsTargetMachine()));
+ addPass(createMipsISelDag(getMipsTargetMachine()));
return false;
}
@@ -125,11 +125,11 @@ bool MipsPassConfig::addInstSelector() {
// print out the code after the passes.
bool MipsPassConfig::addPreEmitPass() {
MipsTargetMachine &TM = getMipsTargetMachine();
- PM->add(createMipsDelaySlotFillerPass(TM));
+ addPass(createMipsDelaySlotFillerPass(TM));
// NOTE: long branch has not been implemented for mips16.
if (TM.getSubtarget<MipsSubtarget>().hasStandardEncoding())
- PM->add(createMipsLongBranchPass(TM));
+ addPass(createMipsLongBranchPass(TM));
return true;
}