diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-09-04 07:47:40 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-09-04 07:47:40 +0000 |
commit | 030a0a0cdb38924e55773a8e0b5fe7347aa664aa (patch) | |
tree | 7dffa62ef1bf0eb250d871fdc39d25cf5f776924 /lib/CodeGen/IfConversion.cpp | |
parent | e93909185fb61ae1b2fd045572d7d51209a39d1c (diff) |
Run branch folding if if-converter make some transformations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r-- | lib/CodeGen/IfConversion.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp index 62bde609be..7b613ff250 100644 --- a/lib/CodeGen/IfConversion.cpp +++ b/lib/CodeGen/IfConversion.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "ifcvt" +#include "BranchFolding.h" #include "llvm/Function.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/MachineModuleInfo.h" @@ -360,6 +361,13 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) { Roots.clear(); BBAnalysis.clear(); + if (MadeChange) { + BranchFolder BF(false); + BF.OptimizeFunction(MF, TII, + MF.getTarget().getRegisterInfo(), + getAnalysisIfAvailable<MachineModuleInfo>()); + } + return MadeChange; } |