[llvm-commits] [llvm] r71291 - in /llvm/trunk: lib/CodeGen/CodePlacementOpt.cpp test/CodeGen/X86/code_placement.ll
Evan Cheng
evan.cheng at apple.com
Fri May 8 16:35:49 PDT 2009
Author: evancheng
Date: Fri May 8 18:35:49 2009
New Revision: 71291
URL: http://llvm.org/viewvc/llvm-project?rev=71291&view=rev
Log:
Enable loop bb placement optimization.
Modified:
llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp
llvm/trunk/test/CodeGen/X86/code_placement.ll
Modified: llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp?rev=71291&r1=71290&r2=71291&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp Fri May 8 18:35:49 2009
@@ -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<bool>
-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 @@
/// jcc <cond> 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;
Modified: llvm/trunk/test/CodeGen/X86/code_placement.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/code_placement.ll?rev=71291&r1=71290&r2=71291&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/code_placement.ll (original)
+++ llvm/trunk/test/CodeGen/X86/code_placement.ll Fri May 8 18:35:49 2009
@@ -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]
More information about the llvm-commits
mailing list