From 4190b507c58fc2e48f0f017f2109a29d99b0d54c Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 16 Apr 2012 13:49:17 +0000 Subject: Flip the new block-placement pass to be on by default. This is mostly to test the waters. I'd like to get results from FNT build bots and other bots running on non-x86 platforms. This feature has been pretty heavily tested over the last few months by me, and it fixes several of the execution time regressions caused by the inlining work by preventing inlining decisions from radically impacting block layout. I've seen very large improvements in yacr2 and ackermann benchmarks, along with the expected noise across all of the benchmark suite whenever code layout changes. I've analyzed all of the regressions and fixed them, or found them to be impossible to fix. See my email to llvmdev for more details. I'd like for this to be in 3.1 as it complements the inliner changes, but if any failures are showing up or anyone has concerns, it is just a flag flip and so can be easily turned off. I'm switching it on tonight to try and get at least one run through various folks' performance suites in case SPEC or something else has serious issues with it. I'll watch bots and revert if anything shows up. llvm-svn: 154816 --- llvm/test/CodeGen/Thumb2/thumb2-branch.ll | 4 ++-- llvm/test/CodeGen/Thumb2/thumb2-ifcvt2.ll | 10 +++++----- llvm/test/CodeGen/Thumb2/thumb2-jtb.ll | 10 +++++++++- 3 files changed, 16 insertions(+), 8 deletions(-) (limited to 'llvm/test/CodeGen/Thumb2') diff --git a/llvm/test/CodeGen/Thumb2/thumb2-branch.ll b/llvm/test/CodeGen/Thumb2/thumb2-branch.ll index 27d8e8fb408..f1c097c1892 100644 --- a/llvm/test/CodeGen/Thumb2/thumb2-branch.ll +++ b/llvm/test/CodeGen/Thumb2/thumb2-branch.ll @@ -58,8 +58,8 @@ define i32 @f4(i32 %a, i32 %b, i32* %v) { entry: ; CHECK: f4: ; CHECK: blo LBB - %tmp = icmp ult i32 %a, %b ; [#uses=1] - br i1 %tmp, label %return, label %cond_true + %tmp = icmp uge i32 %a, %b ; [#uses=1] + br i1 %tmp, label %cond_true, label %return cond_true: ; preds = %entry fence seq_cst diff --git a/llvm/test/CodeGen/Thumb2/thumb2-ifcvt2.ll b/llvm/test/CodeGen/Thumb2/thumb2-ifcvt2.ll index f577f79d691..9a83e655762 100644 --- a/llvm/test/CodeGen/Thumb2/thumb2-ifcvt2.ll +++ b/llvm/test/CodeGen/Thumb2/thumb2-ifcvt2.ll @@ -29,13 +29,13 @@ declare i32 @bar(...) define fastcc i32 @CountTree(%struct.quad_struct* %tree) { entry: ; CHECK: CountTree: -; CHECK: it eq -; CHECK: cmpeq -; CHECK: bne -; CHECK: cmp ; CHECK: itt eq ; CHECK: moveq ; CHECK: popeq +; CHECK: bne +; CHECK: cmp +; CHECK: it eq +; CHECK: cmpeq br label %tailrecurse tailrecurse: ; preds = %bb, %entry @@ -83,7 +83,7 @@ define fastcc void @t2() nounwind { entry: ; CHECK: t2: ; CHECK: cmp r0, #0 -; CHECK: beq +; CHECK: bne br i1 undef, label %bb.i.i3, label %growMapping.exit bb.i.i3: ; preds = %entry diff --git a/llvm/test/CodeGen/Thumb2/thumb2-jtb.ll b/llvm/test/CodeGen/Thumb2/thumb2-jtb.ll index f5a56e5ace0..7e1655f6c25 100644 --- a/llvm/test/CodeGen/Thumb2/thumb2-jtb.ll +++ b/llvm/test/CodeGen/Thumb2/thumb2-jtb.ll @@ -3,11 +3,19 @@ ; Do not use tbb / tbh if any destination is before the jumptable. ; rdar://7102917 -define i16 @main__getopt_internal_2E_exit_2E_ce(i32) nounwind { +define i16 @main__getopt_internal_2E_exit_2E_ce(i32, i1 %b) nounwind { +entry: + br i1 %b, label %codeRepl127.exitStub, label %newFuncRoot + newFuncRoot: br label %_getopt_internal.exit.ce codeRepl127.exitStub: ; preds = %_getopt_internal.exit.ce + ; Add an explicit edge back to before the jump table to ensure this block + ; is placed first. + br i1 %b, label %newFuncRoot, label %codeRepl127.exitStub.exit + +codeRepl127.exitStub.exit: ret i16 0 parse_options.exit.loopexit.exitStub: ; preds = %_getopt_internal.exit.ce -- cgit v1.2.3