diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-10-28 20:46:46 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-10-28 20:46:46 +0000 |
commit | a597103c328e29fb763e7a4864bd7c29a588fc9d (patch) | |
tree | 2702bfc45043f38e63b17dde5931cc522db8fd66 /lib/CodeGen/IfConversion.cpp | |
parent | 90f48e7c91a8faa875ba889ca66b137ffd46e34a (diff) | |
download | external_llvm-a597103c328e29fb763e7a4864bd7c29a588fc9d.zip external_llvm-a597103c328e29fb763e7a4864bd7c29a588fc9d.tar.gz external_llvm-a597103c328e29fb763e7a4864bd7c29a588fc9d.tar.bz2 |
Revert r85346 change to control tail merging by CodeGenOpt::Level.
I'm going to redo this using the OptimizeForSize function attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85426 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r-- | lib/CodeGen/IfConversion.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp index be9e1f1..45f08b1 100644 --- a/lib/CodeGen/IfConversion.cpp +++ b/lib/CodeGen/IfConversion.cpp @@ -148,11 +148,9 @@ namespace { const TargetInstrInfo *TII; bool MadeChange; int FnNum; - CodeGenOpt::Level OptLevel; public: static char ID; - IfConverter(CodeGenOpt::Level OL) : - MachineFunctionPass(&ID), FnNum(-1), OptLevel(OL) {} + IfConverter() : MachineFunctionPass(&ID), FnNum(-1) {} virtual bool runOnMachineFunction(MachineFunction &MF); virtual const char *getPassName() const { return "If Converter"; } @@ -221,9 +219,10 @@ namespace { char IfConverter::ID = 0; } -FunctionPass *llvm::createIfConverterPass(CodeGenOpt::Level OptLevel) { - return new IfConverter(OptLevel); -} +static RegisterPass<IfConverter> +X("if-converter", "If Converter"); + +FunctionPass *llvm::createIfConverterPass() { return new IfConverter(); } bool IfConverter::runOnMachineFunction(MachineFunction &MF) { TLI = MF.getTarget().getTargetLowering(); @@ -363,7 +362,7 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) { BBAnalysis.clear(); if (MadeChange) { - BranchFolder BF(false, OptLevel); + BranchFolder BF(false); BF.OptimizeFunction(MF, TII, MF.getTarget().getRegisterInfo(), getAnalysisIfAvailable<MachineModuleInfo>()); |