From f045f80ba9af29fc8e0409201ad66c8f2e1a527c Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 8 May 2009 23:35:49 +0000 Subject: [PATCH] Enable loop bb placement optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71291 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodePlacementOpt.cpp | 9 --------- test/CodeGen/X86/code_placement.ll | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/CodeGen/CodePlacementOpt.cpp b/lib/CodeGen/CodePlacementOpt.cpp index 1848378e06d..32399bff95f 100644 --- a/lib/CodeGen/CodePlacementOpt.cpp +++ b/lib/CodeGen/CodePlacementOpt.cpp @@ -19,17 +19,11 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/ADT/Statistic.h" using namespace llvm; -static cl::opt -OptLoopBBPlacement("opt-loop-bb-placement", - cl::init(false), cl::Hidden, - cl::desc("Optimize block placements in loops")); - STATISTIC(NumHeaderAligned, "Number of loop header aligned"); STATISTIC(NumIntraElim, "Number of intra loop branches eliminated"); STATISTIC(NumIntraMoved, "Number of intra loop branches moved"); @@ -108,9 +102,6 @@ FunctionPass *llvm::createCodePlacementOptPass() { /// jcc C, [exit] /// bool CodePlacementOpt::OptimizeIntraLoopEdges() { - if (!OptLoopBBPlacement) - return false; - bool Changed = false; for (unsigned i = 0, e = UncondJmpMBBs.size(); i != e; ++i) { MachineBasicBlock *MBB = UncondJmpMBBs[i].first; diff --git a/test/CodeGen/X86/code_placement.ll b/test/CodeGen/X86/code_placement.ll index 3ffb6ba3d82..55167950d1a 100644 --- a/test/CodeGen/X86/code_placement.ll +++ b/test/CodeGen/X86/code_placement.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 -opt-loop-bb-placement | %prcontext jmp 1 | grep align +; RUN: llvm-as < %s | llc -march=x86 | %prcontext jmp 1 | grep align @Te0 = external global [256 x i32] ; <[256 x i32]*> [#uses=5] @Te1 = external global [256 x i32] ; <[256 x i32]*> [#uses=4] -- 2.34.1