diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-05-12 00:56:58 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-05-12 00:56:58 +0000 |
commit | cbc988be22bc9411d95215c8b7251b5f85710674 (patch) | |
tree | ae5cd0c28246db683604531890b7226d77b8633c /lib/CodeGen/BranchFolding.h | |
parent | aeee4616dd12d58fd8d040ab00277747f0312321 (diff) | |
download | llvm-cbc988be22bc9411d95215c8b7251b5f85710674.tar.gz llvm-cbc988be22bc9411d95215c8b7251b5f85710674.tar.bz2 llvm-cbc988be22bc9411d95215c8b7251b5f85710674.tar.xz |
Re-commit 131172 with fix. MachineInstr identity checks should check dead
markers. In some cases a register def is dead on one path, but not on
another.
This is passing Clang self-hosting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.h')
-rw-r--r-- | lib/CodeGen/BranchFolding.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/BranchFolding.h b/lib/CodeGen/BranchFolding.h index 15dfa7f6be..4daf4ecfe5 100644 --- a/lib/CodeGen/BranchFolding.h +++ b/lib/CodeGen/BranchFolding.h @@ -19,11 +19,10 @@ namespace llvm { class RegScavenger; class TargetInstrInfo; class TargetRegisterInfo; - template<typename T> class SmallVectorImpl; class BranchFolder { public: - explicit BranchFolder(bool defaultEnableTailMerge); + explicit BranchFolder(bool defaultEnableTailMerge, bool CommonHoist); bool OptimizeFunction(MachineFunction &MF, const TargetInstrInfo *tii, @@ -85,6 +84,7 @@ namespace llvm { std::vector<SameTailElt> SameTails; bool EnableTailMerge; + bool EnableHoistCommonCode; const TargetInstrInfo *TII; const TargetRegisterInfo *TRI; MachineModuleInfo *MMI; @@ -110,6 +110,9 @@ namespace llvm { bool OptimizeBlock(MachineBasicBlock *MBB); void RemoveDeadBlock(MachineBasicBlock *MBB); bool OptimizeImpDefsBlock(MachineBasicBlock *MBB); + + bool HoistCommonCode(MachineFunction &MF); + bool HoistCommonCodeInSuccs(MachineBasicBlock *MBB); }; } |