summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-11-16 08:38:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-11-16 08:38:26 +0000
commitecb2908bf98749531c148a3d5f2271159f4f66e4 (patch)
tree5c72fb3496e8ad7c9852dde525359f342b87a594 /llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp
parentcca9aa58ca1594c3c74ee6c2055fbe23a6febdc7 (diff)
downloadbcm5719-llvm-ecb2908bf98749531c148a3d5f2271159f4f66e4.tar.gz
bcm5719-llvm-ecb2908bf98749531c148a3d5f2271159f4f66e4.zip
Sink codegen optimization level into MCCodeGenInfo along side relocation model
and code model. This eliminates the need to pass OptLevel flag all over the place and makes it possible for any codegen pass to use this information. llvm-svn: 144788
Diffstat (limited to 'llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp b/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp
index 7bff53ef871..4ad7bd6343c 100644
--- a/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp
+++ b/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp
@@ -34,8 +34,9 @@ extern "C" void LLVMInitializeMBlazeTarget() {
MBlazeTargetMachine::
MBlazeTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
- Reloc::Model RM, CodeModel::Model CM):
- LLVMTargetMachine(T, TT, CPU, FS, RM, CM),
+ Reloc::Model RM, CodeModel::Model CM,
+ CodeGenOpt::Level OL):
+ LLVMTargetMachine(T, TT, CPU, FS, RM, CM, OL),
Subtarget(TT, CPU, FS),
DataLayout("E-p:32:32:32-i8:8:8-i16:16:16"),
InstrInfo(*this),
@@ -46,8 +47,7 @@ MBlazeTargetMachine(const Target &T, StringRef TT,
// Install an instruction selector pass using
// the ISelDag to gen MBlaze code.
-bool MBlazeTargetMachine::addInstSelector(PassManagerBase &PM,
- CodeGenOpt::Level OptLevel) {
+bool MBlazeTargetMachine::addInstSelector(PassManagerBase &PM) {
PM.add(createMBlazeISelDag(*this));
return false;
}
@@ -55,8 +55,7 @@ bool MBlazeTargetMachine::addInstSelector(PassManagerBase &PM,
// Implemented by targets that want to run passes immediately before
// machine code is emitted. return true if -print-machineinstrs should
// print out the code after the passes.
-bool MBlazeTargetMachine::addPreEmitPass(PassManagerBase &PM,
- CodeGenOpt::Level OptLevel) {
+bool MBlazeTargetMachine::addPreEmitPass(PassManagerBase &PM) {
PM.add(createMBlazeDelaySlotFillerPass(*this));
return true;
}
OpenPOWER on IntegriCloud