From: Jakob Stoklund Olesen Date: Mon, 27 Sep 2010 18:43:48 +0000 (+0000) Subject: Revert "Disable codegen prepare critical edge splitting. Machine instruction passes... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=08342f2d11caf484bce394f9513ebc2b4a0498d5;p=oota-llvm.git Revert "Disable codegen prepare critical edge splitting. Machine instruction passes now" This reverts revision 114633. It was breaking llvm-gcc-i386-linux-selfhost. It seems there is a downstream bug that is exposed by -cgp-critical-edge-splitting=0. When that bug is fixed, this patch can go back in. Note that the changes to tailcallfp2.ll are not reverted. They were good are required. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114859 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 880a4e5eb89..3221e143476 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -31,7 +31,6 @@ #include "llvm/Transforms/Utils/BuildLibCalls.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallSet.h" -#include "llvm/ADT/Statistic.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/CommandLine.h" @@ -43,12 +42,10 @@ using namespace llvm; using namespace llvm::PatternMatch; -STATISTIC(NumElim, "Number of blocks eliminated"); - static cl::opt CriticalEdgeSplit("cgp-critical-edge-splitting", cl::desc("Split critical edges during codegen prepare"), - cl::init(false), cl::Hidden); + cl::init(true), cl::Hidden); namespace { class CodeGenPrepare : public FunctionPass { @@ -305,7 +302,6 @@ void CodeGenPrepare::EliminateMostlyEmptyBlock(BasicBlock *BB) { PFI->removeEdge(ProfileInfo::getEdge(BB, DestBB)); } BB->eraseFromParent(); - ++NumElim; DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n"); } diff --git a/test/CodeGen/ARM/lsr-on-unrolled-loops.ll b/test/CodeGen/ARM/lsr-on-unrolled-loops.ll index 0a839e214c5..866be423c2c 100644 --- a/test/CodeGen/ARM/lsr-on-unrolled-loops.ll +++ b/test/CodeGen/ARM/lsr-on-unrolled-loops.ll @@ -624,12 +624,12 @@ bb23: ; preds = %bb22, %bb20, %bb9, bb24: ; preds = %bb23 ; LSR should use count-down iteration to avoid requiring the trip count -; in a register. +; in a register, and it shouldn't require any reloads here. ; CHECK: @ %bb24 ; CHECK-NEXT: @ in Loop: Header=BB1_1 Depth=1 -; CHECK: subs [[REGISTER:(r[0-9]+)|(lr)]], #1 -; CHECK: bne.w +; CHECK-NEXT: sub{{.*}} [[REGISTER:(r[0-9]+)|(lr)]], #1 +; CHECK-NEXT: bne.w %92 = icmp eq i32 %tmp81, %indvar78 ; [#uses=1] %indvar.next79 = add i32 %indvar78, 1 ; [#uses=1] diff --git a/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll b/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll index 06c0dfec5ba..9a6321bb43c 100644 --- a/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll +++ b/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll @@ -10,7 +10,7 @@ define void @_Z19getClosestDiagonal3ii(%0* noalias sret, i32, i32) nounwind { ; CHECK: blx ___muldf3 ; CHECK: blx ___muldf3 -; CHECK: beq LBB0_7 +; CHECK: beq LBB0_8 ; CHECK: blx ___muldf3 ;