[llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp

Chris Lattner sabre at nondot.org
Tue Oct 31 16:38:45 PST 2006



Changes in directory llvm/lib/CodeGen:

BranchFolding.cpp updated: 1.27 -> 1.28
---
Log message:

enable branch folding with an option


---
Diffs of the changes:  (+2 -1)

 BranchFolding.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/BranchFolding.cpp
diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.27 llvm/lib/CodeGen/BranchFolding.cpp:1.28
--- llvm/lib/CodeGen/BranchFolding.cpp:1.27	Sun Oct 29 15:05:41 2006
+++ llvm/lib/CodeGen/BranchFolding.cpp	Tue Oct 31 18:38:31 2006
@@ -30,6 +30,7 @@
 static Statistic<> NumDeadBlocks("branchfold", "Number of dead blocks removed");
 static Statistic<> NumBranchOpts("branchfold", "Number of branches optimized");
 static Statistic<> NumTailMerge ("branchfold", "Number of block tails merged");
+static cl::opt<bool> EnableTailMerge("enable-tail-merge", cl::Hidden);
 
 namespace {
   struct BranchFolder : public MachineFunctionPass {
@@ -258,7 +259,7 @@
 bool BranchFolder::TailMergeBlocks(MachineFunction &MF) {
   MadeChange = false;
   
-  return false;
+  if (!EnableTailMerge) return false;
   
   // Find blocks with no successors.
   std::vector<std::pair<unsigned,MachineBasicBlock*> > MergePotentials;






More information about the llvm-commits mailing list