OSDN Git Service

Increase tail dup threshold for -O3 from 3 to 4.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 17 Aug 2017 23:38:41 +0000 (23:38 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 17 Aug 2017 23:38:41 +0000 (23:38 +0000)
We see a modest performance improvement from this slightly higher tail dup threshold.

Differential Revision: https://reviews.llvm.org/D36775

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311139 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineBlockPlacement.cpp
test/CodeGen/Mips/brconge.ll
test/CodeGen/Mips/brconle.ll
test/CodeGen/X86/tail-dup-repeat.ll

index 374b307..6533030 100644 (file)
@@ -143,7 +143,7 @@ static cl::opt<unsigned> TailDupPlacementAggressiveThreshold(
     "tail-dup-placement-aggressive-threshold",
     cl::desc("Instruction cutoff for aggressive tail duplication during "
              "layout. Used at -O3. Tail merging during layout is forced to "
-             "have a threshold that won't conflict."), cl::init(3),
+             "have a threshold that won't conflict."), cl::init(4),
     cl::Hidden);
 
 // Heuristic for tail duplication.
index f3f059f..910d81c 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc  -march=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16
+; RUN: llc  -march=mipsel -mattr=mips16 -relocation-model=pic -O2 < %s | FileCheck %s -check-prefix=16
 
 @i = global i32 5, align 4
 @j = global i32 10, align 4
index 99599f8..4267dc9 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc  -march=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16
+; RUN: llc  -march=mipsel -mattr=mips16 -relocation-model=pic -O2 < %s | FileCheck %s -check-prefix=16
 
 @i = global i32 -5, align 4
 @j = global i32 10, align 4
index 7d9c090..d635565 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -O3 -tail-dup-placement-threshold=4 -o - %s | FileCheck %s
+; RUN: llc -O3 -o - %s | FileCheck %s
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"