From fe94416753562ab1315fd0961bedd9b416d6a532 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Sun, 20 Aug 2017 06:55:10 +0000 Subject: Revert "Emit only A Single Opt Remark When Inlining" Reverting due to clang build failure git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311274 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../X86/diagnostic-handler-remarks-with-hotness.ll | 5 ---- .../Resolution/X86/diagnostic-handler-remarks.ll | 5 ---- .../X86/diagnostic-handler-remarks-with-hotness.ll | 5 ---- test/LTO/X86/diagnostic-handler-remarks.ll | 5 ---- .../X86/diagnostic-handler-remarks-with-hotness.ll | 10 -------- test/ThinLTO/X86/diagnostic-handler-remarks.ll | 10 -------- .../Inline/optimization-remarks-passed-yaml.ll | 27 ++++++++++++++-------- .../Inline/optimization-remarks-with-hotness.ll | 6 ++--- .../Transforms/Inline/optimization-remarks-yaml.ll | 23 ------------------ test/Transforms/Inline/optimization-remarks.ll | 12 ++-------- 10 files changed, 22 insertions(+), 86 deletions(-) (limited to 'test') diff --git a/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll b/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll index 2daba928e7e..2469570c26b 100644 --- a/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll +++ b/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll @@ -17,11 +17,6 @@ ; YAML-NEXT: - Callee: tinkywinky ; YAML-NEXT: - String: ' inlined into ' ; YAML-NEXT: - Caller: main -; YAML-NEXT: - String: ' with cost=' -; YAML-NEXT: - Cost: '-15000' -; YAML-NEXT: - String: ' (threshold=' -; YAML-NEXT: - Threshold: '337' -; YAML-NEXT: - String: ')' ; YAML-NEXT: ... target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll b/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll index c20cffa42c9..eb1bca3670c 100644 --- a/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll +++ b/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll @@ -15,11 +15,6 @@ ; YAML-NEXT: - Callee: tinkywinky ; YAML-NEXT: - String: ' inlined into ' ; YAML-NEXT: - Caller: main -; YAML-NEXT: - String: ' with cost=' -; YAML-NEXT: - Cost: '-15000' -; YAML-NEXT: - String: ' (threshold=' -; YAML-NEXT: - Threshold: '337' -; YAML-NEXT: - String: ')' ; YAML-NEXT: ... target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll b/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll index 81116996ae2..5d0a9b0a4e2 100644 --- a/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll +++ b/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll @@ -17,11 +17,6 @@ ; YAML-NEXT: - Callee: foo ; YAML-NEXT: - String: ' inlined into ' ; YAML-NEXT: - Caller: main -; YAML-NEXT: - String: ' with cost=' -; YAML-NEXT: - Cost: '-15000' -; YAML-NEXT: - String: ' (threshold=' -; YAML-NEXT: - Threshold: '337' -; YAML-NEXT: - String: ')' ; YAML-NEXT: ... target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" diff --git a/test/LTO/X86/diagnostic-handler-remarks.ll b/test/LTO/X86/diagnostic-handler-remarks.ll index b6d02675bf1..82627fd24ab 100644 --- a/test/LTO/X86/diagnostic-handler-remarks.ll +++ b/test/LTO/X86/diagnostic-handler-remarks.ll @@ -53,11 +53,6 @@ ; YAML-NEXT: - Callee: foo ; YAML-NEXT: - String: ' inlined into ' ; YAML-NEXT: - Caller: main -; YAML-NEXT: - String: ' with cost=' -; YAML-NEXT: - Cost: '-15000' -; YAML-NEXT: - String: ' (threshold=' -; YAML-NEXT: - Threshold: '337' -; YAML-NEXT: - String: ')' ; YAML-NEXT: ... target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" diff --git a/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll b/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll index 0f0e26e53ca..e9dc584e756 100644 --- a/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll +++ b/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll @@ -25,11 +25,6 @@ ; YAML1-NEXT: - Callee: foo ; YAML1-NEXT: - String: ' inlined into ' ; YAML1-NEXT: - Caller: main -; YAML1-NEXT: - String: ' with cost=' -; YAML1-NEXT: - Cost: '-30' -; YAML1-NEXT: - String: ' (threshold=' -; YAML1-NEXT: - Threshold: '337' -; YAML1-NEXT: - String: ')' ; YAML1-NEXT: ... @@ -43,11 +38,6 @@ ; YAML2-NEXT: - Callee: bar ; YAML2-NEXT: - String: ' inlined into ' ; YAML2-NEXT: - Caller: foo -; YAML2-NEXT: - String: ' with cost=' -; YAML2-NEXT: - Cost: '-30' -; YAML2-NEXT: - String: ' (threshold=' -; YAML2-NEXT: - Threshold: '337' -; YAML2-NEXT: - String: ')' ; YAML2-NEXT: ... diff --git a/test/ThinLTO/X86/diagnostic-handler-remarks.ll b/test/ThinLTO/X86/diagnostic-handler-remarks.ll index 2fd2cf8102b..3880b6f1138 100644 --- a/test/ThinLTO/X86/diagnostic-handler-remarks.ll +++ b/test/ThinLTO/X86/diagnostic-handler-remarks.ll @@ -22,11 +22,6 @@ ; YAML1-NEXT: - Callee: foo ; YAML1-NEXT: - String: ' inlined into ' ; YAML1-NEXT: - Caller: main -; YAML1-NEXT: - String: ' with cost=' -; YAML1-NEXT: - Cost: '-30' -; YAML1-NEXT: - String: ' (threshold=' -; YAML1-NEXT: - Threshold: '337' -; YAML1-NEXT: - String: ')' ; YAML1-NEXT: ... @@ -40,11 +35,6 @@ ; YAML2-NEXT: - Callee: bar ; YAML2-NEXT: - String: ' inlined into ' ; YAML2-NEXT: - Caller: foo -; YAML2-NEXT: - String: ' with cost=' -; YAML2-NEXT: - Cost: '-30' -; YAML2-NEXT: - String: ' (threshold=' -; YAML2-NEXT: - Threshold: '337' -; YAML2-NEXT: - String: ')' ; YAML2-NEXT: ... diff --git a/test/Transforms/Inline/optimization-remarks-passed-yaml.ll b/test/Transforms/Inline/optimization-remarks-passed-yaml.ll index 11325b3c623..f532a164857 100644 --- a/test/Transforms/Inline/optimization-remarks-passed-yaml.ll +++ b/test/Transforms/Inline/optimization-remarks-passed-yaml.ll @@ -3,11 +3,6 @@ ; RUN: -pass-remarks-with-hotness 2>&1 | FileCheck %s ; RUN: cat %t | FileCheck -check-prefix=YAML %s -; RUN: opt < %s -S -passes=inline -pass-remarks-output=%t -pass-remarks=inline \ -; RUN: -pass-remarks-missed=inline -pass-remarks-analysis=inline \ -; RUN: -pass-remarks-with-hotness 2>&1 | FileCheck %s -; RUN: cat %t | FileCheck -check-prefix=YAML %s - ; Check the YAML file for inliner-generated passed and analysis remarks. This ; is the input: @@ -17,18 +12,19 @@ ; 4 return foo(); ; 5 } -; CHECK: remark: /tmp/s.c:4:10: foo inlined into bar with cost={{[0-9\-]+}} (threshold={{[0-9]+}}) (hotness: 30) +; CHECK: remark: /tmp/s.c:4:10: foo can be inlined into bar with cost={{[0-9\-]+}} (threshold={{[0-9]+}}) (hotness: 30) +; CHECK-NEXT: remark: /tmp/s.c:4:10: foo inlined into bar (hotness: 30) -; YAML: --- !Passed +; YAML: --- !Analysis ; YAML-NEXT: Pass: inline -; YAML-NEXT: Name: Inlined +; YAML-NEXT: Name: CanBeInlined ; YAML-NEXT: DebugLoc: { File: /tmp/s.c, Line: 4, Column: 10 } ; YAML-NEXT: Function: bar ; YAML-NEXT: Hotness: 30 ; YAML-NEXT: Args: ; YAML-NEXT: - Callee: foo ; YAML-NEXT: DebugLoc: { File: /tmp/s.c, Line: 1, Column: 0 } -; YAML-NEXT: - String: ' inlined into ' +; YAML-NEXT: - String: ' can be inlined into ' ; YAML-NEXT: - Caller: bar ; YAML-NEXT: DebugLoc: { File: /tmp/s.c, Line: 3, Column: 0 } ; YAML-NEXT: - String: ' with cost=' @@ -37,6 +33,19 @@ ; YAML-NEXT: - Threshold: '{{[0-9]+}}' ; YAML-NEXT: - String: ')' ; YAML-NEXT: ... +; YAML-NEXT: --- !Passed +; YAML-NEXT: Pass: inline +; YAML-NEXT: Name: Inlined +; YAML-NEXT: DebugLoc: { File: /tmp/s.c, Line: 4, Column: 10 } +; YAML-NEXT: Function: bar +; YAML-NEXT: Hotness: 30 +; YAML-NEXT: Args: +; YAML-NEXT: - Callee: foo +; YAML-NEXT: DebugLoc: { File: /tmp/s.c, Line: 1, Column: 0 } +; YAML-NEXT: - String: ' inlined into ' +; YAML-NEXT: - Caller: bar +; YAML-NEXT: DebugLoc: { File: /tmp/s.c, Line: 3, Column: 0 } +; YAML-NEXT: ... ; ModuleID = '/tmp/s.c' source_filename = "/tmp/s.c" diff --git a/test/Transforms/Inline/optimization-remarks-with-hotness.ll b/test/Transforms/Inline/optimization-remarks-with-hotness.ll index 3614c3b5230..1d6d135bdda 100644 --- a/test/Transforms/Inline/optimization-remarks-with-hotness.ll +++ b/test/Transforms/Inline/optimization-remarks-with-hotness.ll @@ -1,11 +1,9 @@ ; RUN: opt < %s -inline -pass-remarks=inline -pass-remarks-missed=inline \ ; RUN: -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 \ ; RUN: | FileCheck %s -; RUN: opt < %s -passes=inline -pass-remarks=inline -pass-remarks-missed=inline \ -; RUN: -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 \ -; RUN: | FileCheck %s -; CHECK: foo inlined into bar with cost=always (hotness: 30) +; CHECK: foo should always be inlined (cost=always) (hotness: 30) +; CHECK: foo inlined into bar (hotness: 30) ; CHECK: foz not inlined into bar because it should never be inlined (cost=never) (hotness: 30) ; Function Attrs: alwaysinline nounwind uwtable diff --git a/test/Transforms/Inline/optimization-remarks-yaml.ll b/test/Transforms/Inline/optimization-remarks-yaml.ll index df7fecbc195..16783634484 100644 --- a/test/Transforms/Inline/optimization-remarks-yaml.ll +++ b/test/Transforms/Inline/optimization-remarks-yaml.ll @@ -17,26 +17,6 @@ ; The remarks output file should be empty. ; RUN: test ! -s %t.threshold -; NewPM: -; RUN: opt < %s -S -passes=inline -pass-remarks-missed=inline \ -; RUN: -pass-remarks-with-hotness -pass-remarks-hotness-threshold 15 \ -; RUN: -pass-remarks-output=%t 2>&1 | FileCheck %s -check-prefix=CHECK_NEW -; RUN: test ! -s %t -; RUN: opt < %s -S -passes=inline -pass-remarks-with-hotness -pass-remarks-output=%t -; RUN: test ! -s %t -; -; Verify that remarks that don't meet the hotness threshold are not output. -; RUN: opt < %s -S -passes=inline -pass-remarks-missed=inline \ -; RUN: -pass-remarks-with-hotness -pass-remarks-hotness-threshold 100 \ -; RUN: -pass-remarks-output=%t.threshold 2>&1 | \ -; RUN: FileCheck -check-prefix=THRESHOLD %s -; RUN: test ! -s %t.threshold -; RUN: opt < %s -S -passes=inline \ -; RUN: -pass-remarks-with-hotness -pass-remarks-hotness-threshold 100 \ -; RUN: -pass-remarks-output=%t.threshold -; The remarks output file should be empty. -; RUN: test ! -s %t.threshold - ; Check the YAML file generated for inliner remarks for this program: ; ; 1 int foo(); @@ -79,9 +59,6 @@ ; No remarks should be output, since none meet the threshold. ; THRESHOLD-NOT: remark -; NewPM does not output this kind of "missed" remark. -; CHECK_NEW-NOT: remark - ; ModuleID = '/tmp/s.c' source_filename = "/tmp/s.c" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" diff --git a/test/Transforms/Inline/optimization-remarks.ll b/test/Transforms/Inline/optimization-remarks.ll index 3f8332134e0..61e270cff76 100644 --- a/test/Transforms/Inline/optimization-remarks.ll +++ b/test/Transforms/Inline/optimization-remarks.ll @@ -5,18 +5,10 @@ ; RUN: -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 | \ ; RUN: FileCheck -check-prefix=CHECK -check-prefix=HOTNESS %s -; RUN: opt < %s -passes=inline -pass-remarks=inline -pass-remarks-missed=inline \ -; RUN: -pass-remarks-analysis=inline -S 2>&1 | \ -; RUN: FileCheck -check-prefix=CHECK -check-prefix=NO_HOTNESS %s -; RUN: opt < %s -passes=inline -pass-remarks=inline -pass-remarks-missed=inline \ -; RUN: -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 | \ -; RUN: FileCheck -check-prefix=CHECK -check-prefix=HOTNESS_NEW %s - ; HOTNESS: fox will not be inlined into bar because its definition is unavailable ; NO_HOTNESS-NOT: fox will not be inlined into bar because its definition is unavailable -; NewPM's inliner does not emit the following remark: -; HOTNESS_NEW-NOT: fox will not be inlined into bar because its definition is unavailable -; CHECK: foo inlined into bar with cost=always +; CHECK: foo should always be inlined (cost=always) +; CHECK: foo inlined into bar ; CHECK: foz not inlined into bar because it should never be inlined (cost=never) ; Function Attrs: alwaysinline nounwind uwtable -- cgit v1.2.3