diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-04-29 23:29:43 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-04-29 23:29:43 +0000 |
commit | 5ed22ac54c2530a1d0d140d259f881f3b2040e56 (patch) | |
tree | 740060aedf3541a695c8ee54326cd88874936263 /lib/Target/ARM/ARMTargetMachine.cpp | |
parent | f0d2d9593dbeca56c962391c18ddb059e2ee9bef (diff) | |
download | external_llvm-5ed22ac54c2530a1d0d140d259f881f3b2040e56.zip external_llvm-5ed22ac54c2530a1d0d140d259f881f3b2040e56.tar.gz external_llvm-5ed22ac54c2530a1d0d140d259f881f3b2040e56.tar.bz2 |
Instead of passing in an unsigned value for the optimization level, use an enum,
which better identifies what the optimization is doing. And is more flexible for
future uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r-- | lib/Target/ARM/ARMTargetMachine.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index a2ee52e..a5ce86e 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -138,17 +138,20 @@ const TargetAsmInfo *ARMTargetMachine::createTargetAsmInfo() const { // Pass Pipeline Configuration -bool ARMTargetMachine::addInstSelector(PassManagerBase &PM, unsigned OptLevel) { +bool ARMTargetMachine::addInstSelector(PassManagerBase &PM, + CodeGenOpt::Level OptLevel) { PM.add(createARMISelDag(*this)); return false; } -bool ARMTargetMachine::addPreEmitPass(PassManagerBase &PM, unsigned OptLevel) { +bool ARMTargetMachine::addPreEmitPass(PassManagerBase &PM, + CodeGenOpt::Level OptLevel) { // FIXME: temporarily disabling load / store optimization pass for Thumb mode. - if (OptLevel != 0 && !DisableLdStOpti && !Subtarget.isThumb()) + if (OptLevel != CodeGenOpt::None && !DisableLdStOpti && !Subtarget.isThumb()) PM.add(createARMLoadStoreOptimizationPass()); - if (OptLevel != 0 && !DisableIfConversion && !Subtarget.isThumb()) + if (OptLevel != CodeGenOpt::None && + !DisableIfConversion && !Subtarget.isThumb()) PM.add(createIfConverterPass()); PM.add(createARMConstantIslandPass()); @@ -156,7 +159,7 @@ bool ARMTargetMachine::addPreEmitPass(PassManagerBase &PM, unsigned OptLevel) { } bool ARMTargetMachine::addAssemblyEmitter(PassManagerBase &PM, - unsigned OptLevel, + CodeGenOpt::Level OptLevel, bool Verbose, raw_ostream &Out) { // Output assembly language. @@ -168,8 +171,10 @@ bool ARMTargetMachine::addAssemblyEmitter(PassManagerBase &PM, } -bool ARMTargetMachine::addCodeEmitter(PassManagerBase &PM, unsigned OptLevel, - bool DumpAsm, MachineCodeEmitter &MCE) { +bool ARMTargetMachine::addCodeEmitter(PassManagerBase &PM, + CodeGenOpt::Level OptLevel, + bool DumpAsm, + MachineCodeEmitter &MCE) { // FIXME: Move this to TargetJITInfo! if (DefRelocModel == Reloc::Default) setRelocationModel(Reloc::Static); @@ -186,7 +191,7 @@ bool ARMTargetMachine::addCodeEmitter(PassManagerBase &PM, unsigned OptLevel, } bool ARMTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - unsigned OptLevel, + CodeGenOpt::Level OptLevel, bool DumpAsm, MachineCodeEmitter &MCE) { // Machine code emitter pass for ARM. |