MaskRay created this revision.
MaskRay added reviewers: anemet, hoy, tejohnson.
Herald added subscribers: ormris, wenlei, steven_wu, hiraditya.
MaskRay requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

Clang diagnostics refer to identifier names in quotes.
This patch makes inline remarks conform to the convention.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107791

Files:
  clang/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
  clang/test/Frontend/optimization-remark-line-directive.c
  clang/test/Frontend/optimization-remark-new-pm.c
  clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
  clang/test/Frontend/optimization-remark-with-hotness.c
  clang/test/Frontend/optimization-remark.c
  clang/test/Frontend/remarks-hotness.cpp
  llvm/lib/Analysis/InlineAdvisor.cpp
  llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
  llvm/test/LTO/X86/diagnostic-handler-remarks.ll
  llvm/test/Other/optimization-remarks-auto.ll
  llvm/test/Other/optimization-remarks-inline.ll
  llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
  llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll
  llvm/test/Transforms/Inline/ARM/inline-fp.ll
  llvm/test/Transforms/Inline/cgscc-inline-replay.ll
  llvm/test/Transforms/Inline/inline_noprofile.ll
  llvm/test/Transforms/Inline/inline_nossp.ll
  llvm/test/Transforms/Inline/optimization-remarks-hotness-threshold.ll
  llvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll
  llvm/test/Transforms/Inline/optimization-remarks-with-hotness.ll
  llvm/test/Transforms/Inline/optimization-remarks.ll
  llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
  llvm/test/Transforms/SampleProfile/csspgo-inline.ll
  llvm/test/Transforms/SampleProfile/inline-replay.ll
  llvm/test/Transforms/SampleProfile/remarks-hotness.ll
  llvm/test/Transforms/SampleProfile/remarks.ll
  llvm/test/tools/gold/X86/remarks.ll

Index: llvm/test/tools/gold/X86/remarks.ll
===================================================================
--- llvm/test/tools/gold/X86/remarks.ll
+++ llvm/test/tools/gold/X86/remarks.ll
@@ -7,7 +7,7 @@
 ; RUN:   %t.o -o %t2.o 2>&1 | FileCheck -allow-empty --check-prefix=NO-REMARK %s
 
 
-; CHECK: f inlined into _start
+; CHECK: 'f' inlined into '_start'
 ; NO-REMARK-NOT: inlined
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
Index: llvm/test/Transforms/SampleProfile/remarks.ll
===================================================================
--- llvm/test/Transforms/SampleProfile/remarks.ll
+++ llvm/test/Transforms/SampleProfile/remarks.ll
@@ -21,8 +21,8 @@
 
 ; We are expecting foo() to be inlined in main() (almost all the cycles are
 ; spent inside foo).
-; CHECK: remark: remarks.cc:13:21: _Z3foov inlined into main to match profiling context with (cost=130, threshold=2147483647) at callsite main:0:21;
-; CHECK: remark: remarks.cc:9:19: rand inlined into main to match profiling context with (cost=always): always inline attribute at callsite _Z3foov:6:19 @ main:0:21;
+; CHECK: remark: remarks.cc:13:21: '_Z3foov' inlined into 'main' to match profiling context with (cost=130, threshold=2147483647) at callsite main:0:21;
+; CHECK: remark: remarks.cc:9:19: 'rand' inlined into 'main' to match profiling context with (cost=always): always inline attribute at callsite _Z3foov:6:19 @ main:0:21;
 
 ; The back edge for the loop is the hottest edge in the loop subgraph.
 ; CHECK: remark: remarks.cc:6:9: most popular destination for conditional branches at remarks.cc:5:3
Index: llvm/test/Transforms/SampleProfile/remarks-hotness.ll
===================================================================
--- llvm/test/Transforms/SampleProfile/remarks-hotness.ll
+++ llvm/test/Transforms/SampleProfile/remarks-hotness.ll
@@ -36,8 +36,8 @@
 ; YAML-MISS-NEXT: Function:        _Z7caller2v
 ; YAML-MISS-NEXT: Hotness:         2
 
-; CHECK-RPASS: _Z7callee1v inlined into _Z7caller1v with (cost=-30, threshold=4500) at callsite _Z7caller1v:1:10; (hotness: 401)
-; CHECK-RPASS-NOT: _Z7callee2v not inlined into _Z7caller2v because it should never be inlined (cost=never): noinline function attribute (hotness: 2)
+; CHECK-RPASS: '_Z7callee1v' inlined into '_Z7caller1v' with (cost=-30, threshold=4500) at callsite _Z7caller1v:1:10; (hotness: 401)
+; CHECK-RPASS-NOT: '_Z7callee2v' not inlined into '_Z7caller2v' because it should never be inlined (cost=never): noinline function attribute (hotness: 2)
 
 ; ModuleID = 'remarks-hotness.cpp'
 source_filename = "remarks-hotness.cpp"
Index: llvm/test/Transforms/SampleProfile/inline-replay.ll
===================================================================
--- llvm/test/Transforms/SampleProfile/inline-replay.ll
+++ llvm/test/Transforms/SampleProfile/inline-replay.ll
@@ -113,10 +113,10 @@
 !26 = !DILocation(line: 12, scope: !12)
 
 
-; DEFAULT: _Z3sumii inlined into main
-; DEFAULT: _Z3subii inlined into _Z3sumii
-; DEFAULT-NOT: _Z3subii inlined into main
+; DEFAULT: '_Z3sumii' inlined into 'main'
+; DEFAULT: '_Z3subii' inlined into '_Z3sumii'
+; DEFAULT-NOT: '_Z3subii' inlined into 'main'
 
-; REPLAY: _Z3sumii inlined into main
-; REPLAY: _Z3subii inlined into main
-; REPLAY-NOT: _Z3subii inlined into _Z3sumii
+; REPLAY: '_Z3sumii' inlined into 'main'
+; REPLAY: '_Z3subii' inlined into 'main'
+; REPLAY-NOT: '_Z3subii' inlined into '_Z3sumii'
Index: llvm/test/Transforms/SampleProfile/csspgo-inline.ll
===================================================================
--- llvm/test/Transforms/SampleProfile/csspgo-inline.ll
+++ llvm/test/Transforms/SampleProfile/csspgo-inline.ll
@@ -21,16 +21,16 @@
 ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/profile-context-tracker.prof -sample-profile-inline-size -profile-summary-cutoff-hot=999900 -sample-profile-inline-limit-min=10 -sample-profile-inline-growth-limit=1 -profile-sample-accurate -S -pass-remarks=inline -o /dev/null 2>&1 | FileCheck %s --check-prefix=INLINE-NEW-LIMIT2
 
 
-; INLINE-BASE: remark: merged.cpp:14:10: _Z5funcAi inlined into main to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
-; INLINE-BASE: remark: merged.cpp:27:11: _Z8funcLeafi inlined into main to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcAi:1:11 @ main:3:10
-; INLINE-BASE: remark: merged.cpp:33:11: _Z8funcLeafi inlined into _Z5funcBi to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
+; INLINE-BASE: remark: merged.cpp:14:10: '_Z5funcAi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
+; INLINE-BASE: remark: merged.cpp:27:11: '_Z8funcLeafi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcAi:1:11 @ main:3:10
+; INLINE-BASE: remark: merged.cpp:33:11: '_Z8funcLeafi' inlined into '_Z5funcBi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
 
-; INLINE-NEW: remark: merged.cpp:14:10: _Z5funcAi inlined into main to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
+; INLINE-NEW: remark: merged.cpp:14:10: '_Z5funcAi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
 ; INLINE-NEW-NOT: remark
 
 ; INLINE-NEW-LIMIT1-NOT: remark
 
-; INLINE-NEW-LIMIT2: remark: merged.cpp:33:11: _Z8funcLeafi inlined into _Z5funcBi to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
+; INLINE-NEW-LIMIT2: remark: merged.cpp:33:11: '_Z8funcLeafi' inlined into '_Z5funcBi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
 ; INLINE-NEW-LIMIT2-NOT: remark
 
 @factor = dso_local global i32 3, align 4, !dbg !0
Index: llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
===================================================================
--- llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
+++ llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
@@ -54,10 +54,10 @@
 !11 = distinct !DISubprogram(name: "zoo", linkageName: "_Z3zoov", scope: !1, file: !1, line: 24, unit: !0)
 
 
-; ICP-ALL: remark: test.cc:5:0: _Z3bazv inlined into test
-; ICP-ALL-NEXT: remark: test.cc:4:0: _Z3foov inlined into test
-; ICP-ALL-NEXT: remark: test.cc:4:0: _Z3barv inlined into test
+; ICP-ALL: remark: test.cc:5:0: '_Z3bazv' inlined into 'test'
+; ICP-ALL-NEXT: remark: test.cc:4:0: '_Z3foov' inlined into 'test'
+; ICP-ALL-NEXT: remark: test.cc:4:0: '_Z3barv' inlined into 'test'
 ; ICP-ALL-NOT: remark
 
-; ICP-HOT: remark: test.cc:4:0: _Z3foov inlined into test
+; ICP-HOT: remark: test.cc:4:0: '_Z3foov' inlined into 'test'
 ; ICP-HOT-NOT: remark
Index: llvm/test/Transforms/Inline/optimization-remarks.ll
===================================================================
--- llvm/test/Transforms/Inline/optimization-remarks.ll
+++ llvm/test/Transforms/Inline/optimization-remarks.ll
@@ -26,10 +26,10 @@
 ; RUN:       -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 | \
 ; RUN:       FileCheck -check-prefixes=CHECK,HOTNESS,ALWAYS %s
 
-; HOTNESS-DAG: 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
-; ALWAYS-DAG: foo inlined into bar with (cost=always): always inline attribute
-; CHECK-DAG: foz not inlined into bar because it should never be inlined (cost=never): noinline function attribute
+; HOTNESS-DAG: 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
+; ALWAYS-DAG: 'foo' inlined into 'bar' with (cost=always): always inline attribute
+; CHECK-DAG: 'foz' not inlined into 'bar' because it should never be inlined (cost=never): noinline function attribute
 
 ; Function Attrs: alwaysinline nounwind uwtable
 define i32 @foo(i32 %x, i32 %y) #0 !prof !1 {
Index: llvm/test/Transforms/Inline/optimization-remarks-with-hotness.ll
===================================================================
--- llvm/test/Transforms/Inline/optimization-remarks-with-hotness.ll
+++ llvm/test/Transforms/Inline/optimization-remarks-with-hotness.ll
@@ -8,8 +8,8 @@
 ; RUN:     -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 \
 ; RUN:     | FileCheck %s
 
-; CHECK: foo inlined into bar with (cost=always): always inline attribute (hotness: 30)
-; CHECK: foz not inlined into bar because it should never be inlined (cost=never): noinline function attribute (hotness: 30)
+; CHECK: 'foo' inlined into 'bar' with (cost=always): always inline attribute (hotness: 30)
+; CHECK: 'foz' not inlined into 'bar' because it should never be inlined (cost=never): noinline function attribute (hotness: 30)
 
 ; Function Attrs: alwaysinline nounwind uwtable
 define i32 @foo() #0 !prof !1 {
Index: llvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll
===================================================================
--- llvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll
+++ llvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll
@@ -22,7 +22,7 @@
 ;  4       return foo();
 ;  5     }
 
-; CHECK: remark: /tmp/s.c:4:10: foo inlined into bar with (cost={{[0-9\-]+}}, threshold={{[0-9]+}}) at callsite bar:1:10; (hotness: 30)
+; CHECK: remark: /tmp/s.c:4:10: 'foo' inlined into 'bar' with (cost={{[0-9\-]+}}, threshold={{[0-9]+}}) at callsite bar:1:10; (hotness: 30)
 
 ; YAML:      --- !Passed
 ; YAML-NEXT: Pass:            inline
Index: llvm/test/Transforms/Inline/optimization-remarks-hotness-threshold.ll
===================================================================
--- llvm/test/Transforms/Inline/optimization-remarks-hotness-threshold.ll
+++ llvm/test/Transforms/Inline/optimization-remarks-hotness-threshold.ll
@@ -18,7 +18,7 @@
 ;  4       return foo();
 ;  5     }
 
-; CHECK: remark: /tmp/s.c:4:10: foo inlined into bar with (cost={{[0-9\-]+}}, threshold={{[0-9]+}})
+; CHECK: remark: /tmp/s.c:4:10: 'foo' inlined into 'bar' with (cost={{[0-9\-]+}}, threshold={{[0-9]+}})
 ; THRESHOLD-NOT: remark
 
 ; ModuleID = '/tmp/s.c'
Index: llvm/test/Transforms/Inline/inline_nossp.ll
===================================================================
--- llvm/test/Transforms/Inline/inline_nossp.ll
+++ llvm/test/Transforms/Inline/inline_nossp.ll
@@ -2,8 +2,8 @@
 ; RUN: opt -passes='cgscc(inline)' %s -S -pass-remarks-missed=inline 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-INLINE %s
 ; RUN: opt -passes=always-inline -o - -S %s | FileCheck %s
 
-; CHECK-INLINE: ssp not inlined into nossp_caller because it should never be inlined (cost=never): stack protected callee but caller requested no stack protector
-; CHECK-INLINE: nossp not inlined into ssp_caller because it should never be inlined (cost=never): stack protected caller but callee requested no stack protector
+; CHECK-INLINE: 'ssp' not inlined into 'nossp_caller' because it should never be inlined (cost=never): stack protected callee but caller requested no stack protector
+; CHECK-INLINE: 'nossp' not inlined into 'ssp_caller' because it should never be inlined (cost=never): stack protected caller but callee requested no stack protector
 
 ; Not interesting to test.
 define i32 @nossp() { ret i32 41 }
Index: llvm/test/Transforms/Inline/inline_noprofile.ll
===================================================================
--- llvm/test/Transforms/Inline/inline_noprofile.ll
+++ llvm/test/Transforms/Inline/inline_noprofile.ll
@@ -5,8 +5,8 @@
 ; Test that we don't inline when caller and callee don't have matching
 ; noprofile fn attrs.
 
-; CHECK-INLINE: profile not inlined into profile_caller because it should never be inlined (cost=never): conflicting attributes
-; CHECK-INLINE: noprofile not inlined into noprofile_caller because it should never be inlined (cost=never): conflicting attributes
+; CHECK-INLINE: 'profile' not inlined into 'profile_caller' because it should never be inlined (cost=never): conflicting attributes
+; CHECK-INLINE: 'noprofile' not inlined into 'noprofile_caller' because it should never be inlined (cost=never): conflicting attributes
 
 define i32 @profile() { ret i32 42 }
 define i32 @noprofile() noprofile { ret i32 43 }
Index: llvm/test/Transforms/Inline/cgscc-inline-replay.ll
===================================================================
--- llvm/test/Transforms/Inline/cgscc-inline-replay.ll
+++ llvm/test/Transforms/Inline/cgscc-inline-replay.ll
@@ -110,10 +110,10 @@
 !25 = !DILocation(line: 11, scope: !12)
 !26 = !DILocation(line: 12, scope: !12)
 
-; DEFAULT: _Z3subii inlined into _Z3sumii
-; DEFAULT: _Z3sumii inlined into main
-; DEFAULT-NOT: _Z3subii inlined into main
+; DEFAULT: '_Z3subii' inlined into '_Z3sumii'
+; DEFAULT: '_Z3sumii' inlined into 'main'
+; DEFAULT-NOT: '_Z3subii' inlined into 'main'
 
-; REPLAY: _Z3sumii inlined into main
-; REPLAY: _Z3subii inlined into main
-; REPLAY-NOT: _Z3subii inlined into _Z3sumii
+; REPLAY: '_Z3sumii' inlined into 'main'
+; REPLAY: '_Z3subii' inlined into 'main'
+; REPLAY-NOT: '_Z3subii' inlined into '_Z3sumii'
Index: llvm/test/Transforms/Inline/ARM/inline-fp.ll
===================================================================
--- llvm/test/Transforms/Inline/ARM/inline-fp.ll
+++ llvm/test/Transforms/Inline/ARM/inline-fp.ll
@@ -4,38 +4,38 @@
 ; Make sure that soft float implementations are calculated as being more expensive
 ; to the inliner.
 
-; NOFP-DAG: single not inlined into test_single because too costly to inline (cost=125, threshold=75)
-; NOFP-DAG: single not inlined into test_single because too costly to inline (cost=125, threshold=75)
-; NOFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15, threshold=75)
-; NOFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15015, threshold=75)
-; NOFP-DAG: double not inlined into test_double because too costly to inline (cost=125, threshold=75)
-; NOFP-DAG: double not inlined into test_double because too costly to inline (cost=125, threshold=75)
-; NOFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
-; NOFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
-; NOFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
-; NOFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
+; NOFP-DAG: 'single' not inlined into 'test_single' because too costly to inline (cost=125, threshold=75)
+; NOFP-DAG: 'single' not inlined into 'test_single' because too costly to inline (cost=125, threshold=75)
+; NOFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15, threshold=75)
+; NOFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15015, threshold=75)
+; NOFP-DAG: 'double' not inlined into 'test_double' because too costly to inline (cost=125, threshold=75)
+; NOFP-DAG: 'double' not inlined into 'test_double' because too costly to inline (cost=125, threshold=75)
+; NOFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
+; NOFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
+; NOFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
+; NOFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
 
-; FULLFP-DAG: single inlined into test_single with (cost=0, threshold=75)
-; FULLFP-DAG: single inlined into test_single with (cost=-15000, threshold=75)
-; FULLFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15, threshold=75)
-; FULLFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15015, threshold=75)
-; FULLFP-DAG: double inlined into test_double with (cost=0, threshold=75)
-; FULLFP-DAG: double inlined into test_double with (cost=-15000, threshold=75)
-; FULLFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
-; FULLFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
-; FULLFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
-; FULLFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
+; FULLFP-DAG: 'single' inlined into 'test_single' with (cost=0, threshold=75)
+; FULLFP-DAG: 'single' inlined into 'test_single' with (cost=-15000, threshold=75)
+; FULLFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15, threshold=75)
+; FULLFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15015, threshold=75)
+; FULLFP-DAG: 'double' inlined into 'test_double' with (cost=0, threshold=75)
+; FULLFP-DAG: 'double' inlined into 'test_double' with (cost=-15000, threshold=75)
+; FULLFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
+; FULLFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
+; FULLFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
+; FULLFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
 
-; SINGLEFP-DAG: single inlined into test_single with (cost=0, threshold=75)
-; SINGLEFP-DAG: single inlined into test_single with (cost=-15000, threshold=75)
-; SINGLEFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15, threshold=75)
-; SINGLEFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15015, threshold=75)
-; SINGLEFP-DAG: double not inlined into test_double because too costly to inline (cost=125, threshold=75)
-; SINGLEFP-DAG: double not inlined into test_double because too costly to inline (cost=125, threshold=75)
-; SINGLEFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
-; SINGLEFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
-; SINGLEFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
-; SINGLEFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
+; SINGLEFP-DAG: 'single' inlined into 'test_single' with (cost=0, threshold=75)
+; SINGLEFP-DAG: 'single' inlined into 'test_single' with (cost=-15000, threshold=75)
+; SINGLEFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15, threshold=75)
+; SINGLEFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15015, threshold=75)
+; SINGLEFP-DAG: 'double' not inlined into 'test_double' because too costly to inline (cost=125, threshold=75)
+; SINGLEFP-DAG: 'double' not inlined into 'test_double' because too costly to inline (cost=125, threshold=75)
+; SINGLEFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
+; SINGLEFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
+; SINGLEFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
+; SINGLEFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
 
 define i32 @test_single(i32 %a, i8 %b, i32 %c, i8 %d) #0 {
   %call = call float @single(i32 %a, i8 zeroext %b)
Index: llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll
===================================================================
--- llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll
+++ llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll
@@ -15,16 +15,18 @@
 ; CHECK-NOT: llvm-lto:
 
 
-; Verify that bar is imported and inlined into foo
+; Verify that bar is imported 'and' inlined into 'foo'
 ; RUN: cat %t.yaml.thin.0.yaml | FileCheck %s -check-prefix=YAML1
 ; YAML1:      --- !Passed
 ; YAML1-NEXT: Pass:            inline
 ; YAML1-NEXT: Name:            Inlined
 ; YAML1-NEXT: Function:        main
 ; YAML1-NEXT: Args:
+; YAML1-NEXT:   - String:          ''''
 ; YAML1-NEXT:   - Callee:          foo
-; YAML1-NEXT:   - String:          ' inlined into '
+; YAML1-NEXT:   - String:          ''' inlined into '
 ; YAML1-NEXT:   - Caller:          main
+; YAML1-NEXT:   - String:          ''''
 ; YAML1-NEXT:   - String:          ' with '
 ; YAML1-NEXT:   - String:          '(cost='
 ; YAML1-NEXT:   - Cost:            '-30'
@@ -34,16 +36,18 @@
 ; YAML1-NEXT: ...
 
 
-; Verify that bar is imported and inlined into foo
+; Verify that bar is imported 'and' inlined into 'foo'
 ; RUN: cat %t.yaml.thin.1.yaml | FileCheck %s -check-prefix=YAML2
 ; YAML2: --- !Passed
 ; YAML2-NEXT: Pass:            inline
 ; YAML2-NEXT: Name:            Inlined
 ; YAML2-NEXT: Function:        foo
 ; YAML2-NEXT: Args:
+; YAML2-NEXT:   - String:          ''''
 ; YAML2-NEXT:   - Callee:          bar
-; YAML2-NEXT:   - String:          ' inlined into '
+; YAML2-NEXT:   - String:          ''' inlined into '
 ; YAML2-NEXT:   - Caller:          foo
+; YAML2-NEXT:   - String:          ''''
 ; YAML2-NEXT:   - String:          ' with '
 ; YAML2-NEXT:   - String:          '(cost='
 ; YAML2-NEXT:   - Cost:            '-30'
Index: llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
===================================================================
--- llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
+++ llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
@@ -15,7 +15,7 @@
 ; CHECK-NOT: llvm-lto:
 
 
-; Verify that bar is imported and inlined into foo
+; Verify that bar is imported 'and' inlined into 'foo'
 ; RUN: cat %t.yaml.thin.0.yaml | FileCheck %s -check-prefix=YAML1
 ; YAML1:      --- !Passed
 ; YAML1-NEXT: Pass:            inline
@@ -23,9 +23,11 @@
 ; YAML1-NEXT: Function:        main
 ; YAML1-NEXT: Hotness:         50
 ; YAML1-NEXT: Args:
+; YAML1-NEXT:   - String:          ''''
 ; YAML1-NEXT:   - Callee:          foo
-; YAML1-NEXT:   - String:          ' inlined into '
+; YAML1-NEXT:   - String:          ''' inlined into '
 ; YAML1-NEXT:   - Caller:          main
+; YAML1-NEXT:   - String:          ''''
 ; YAML1-NEXT:   - String:          ' with '
 ; YAML1-NEXT:   - String:          '(cost='
 ; YAML1-NEXT:   - Cost:            '-30'
@@ -35,16 +37,18 @@
 ; YAML1-NEXT: ...
 
 
-; Verify that bar is imported and inlined into foo
+; Verify that bar is imported 'and' inlined into 'foo'
 ; RUN: cat %t.yaml.thin.1.yaml | FileCheck %s -check-prefix=YAML2
 ; YAML2:      --- !Passed
 ; YAML2-NEXT: Pass:            inline
 ; YAML2-NEXT: Name:            Inlined
 ; YAML2-NEXT: Function:        foo
 ; YAML2-NEXT: Args:
+; YAML2-NEXT:   - String:          ''''
 ; YAML2-NEXT:   - Callee:          bar
-; YAML2-NEXT:   - String:          ' inlined into '
+; YAML2-NEXT:   - String:          ''' inlined into '
 ; YAML2-NEXT:   - Caller:          foo
+; YAML2-NEXT:   - String:          ''''
 ; YAML2-NEXT:   - String:          ' with '
 ; YAML2-NEXT:   - String:          '(cost='
 ; YAML2-NEXT:   - Cost:            '-30'
Index: llvm/test/Other/optimization-remarks-inline.ll
===================================================================
--- llvm/test/Other/optimization-remarks-inline.ll
+++ llvm/test/Other/optimization-remarks-inline.ll
@@ -32,8 +32,8 @@
   %1 = load i32, i32* %j.addr, align 4
   %sub = sub nsw i32 %1, 2
   %call = call i32 @foo(i32 %0, i32 %sub)
-; CHECK: foo inlined into bar
-; REMARKS-NOT: foo inlined into bar
+; CHECK: 'foo' inlined into 'bar'
+; REMARKS-NOT: 'foo' inlined into 'bar'
   ret i32 %call
 }
 
Index: llvm/test/Other/optimization-remarks-auto.ll
===================================================================
--- llvm/test/Other/optimization-remarks-auto.ll
+++ llvm/test/Other/optimization-remarks-auto.ll
@@ -34,8 +34,8 @@
 ; YAML-MISS-NEXT: Function:        caller2
 ; YAML-MISS-NEXT: Hotness:         1
 
-; CHECK-RPASS: callee1 inlined into caller1 with (cost=-30, threshold=4500) (hotness: 400)
-; CHECK-RPASS-NOT: callee2 not inlined into caller2 because it should never be inlined (cost=never): noinline function attribute (hotness: 1)
+; CHECK-RPASS: 'callee1' inlined into 'caller1' with (cost=-30, threshold=4500) (hotness: 400)
+; CHECK-RPASS-NOT: 'callee2' not inlined into 'caller2' because it should never be inlined (cost=never): noinline function attribute (hotness: 1)
 
 define void @callee1() !prof !20 {
 ; CHECK: callee1 :hot
Index: llvm/test/LTO/X86/diagnostic-handler-remarks.ll
===================================================================
--- llvm/test/LTO/X86/diagnostic-handler-remarks.ll
+++ llvm/test/LTO/X86/diagnostic-handler-remarks.ll
@@ -41,9 +41,9 @@
 ; RUN:     FileCheck %s -allow-empty
 ; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML
 
-; REMARKS: remark: {{.*}} foo inlined into main
+; REMARKS: remark: {{.*}} 'foo' inlined into 'main'
 ; REMARKS: remark: {{.*}} loop not vectorized: cannot prove it is safe to reorder memory operations
-; REMARKS_DH: llvm-lto: remark: {{.*}} foo inlined into main
+; REMARKS_DH: llvm-lto: remark: {{.*}} 'foo' inlined into 'main'
 ; REMARKS_DH: llvm-lto: remark: {{.*}} loop not vectorized: cannot prove it is safe to reorder memory operations
 ; CHECK-NOT: remark:
 ; CHECK-NOT: llvm-lto:
Index: llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
===================================================================
--- llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
+++ llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
@@ -69,7 +69,7 @@
 ; YAML-NEXT:   - String:          ')'
 ; YAML-NEXT: ...
 
-; CHECK: tinkywinky inlined into main with (cost=-15000, threshold=337) (hotness: 300)
+; CHECK: 'tinkywinky' inlined into 'main' with (cost=-15000, threshold=337) (hotness: 300)
 
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
Index: llvm/lib/Analysis/InlineAdvisor.cpp
===================================================================
--- llvm/lib/Analysis/InlineAdvisor.cpp
+++ llvm/lib/Analysis/InlineAdvisor.cpp
@@ -343,15 +343,15 @@
     if (IC.isNever()) {
       ORE.emit([&]() {
         return OptimizationRemarkMissed(DEBUG_TYPE, "NeverInline", Call)
-               << NV("Callee", Callee) << " not inlined into "
-               << NV("Caller", Caller) << " because it should never be inlined "
-               << IC;
+               << "'" << NV("Callee", Callee) << "' not inlined into '"
+               << NV("Caller", Caller)
+               << "' because it should never be inlined " << IC;
       });
     } else {
       ORE.emit([&]() {
         return OptimizationRemarkMissed(DEBUG_TYPE, "TooCostly", Call)
-               << NV("Callee", Callee) << " not inlined into "
-               << NV("Caller", Caller) << " because too costly to inline "
+               << "'" << NV("Callee", Callee) << "' not inlined into '"
+               << NV("Caller", Caller) << "' because too costly to inline "
                << IC;
       });
     }
@@ -444,8 +444,8 @@
     StringRef RemarkName = AlwaysInline ? "AlwaysInline" : "Inlined";
     OptimizationRemark Remark(PassName ? PassName : DEBUG_TYPE, RemarkName,
                               DLoc, Block);
-    Remark << ore::NV("Callee", &Callee) << " inlined into ";
-    Remark << ore::NV("Caller", &Caller);
+    Remark << "'" << ore::NV("Callee", &Callee) << "' inlined into '"
+           << ore::NV("Caller", &Caller) << "'";
     if (ForProfileContext)
       Remark << " to match profiling context";
     Remark << " with " << IC;
Index: clang/test/Frontend/remarks-hotness.cpp
===================================================================
--- clang/test/Frontend/remarks-hotness.cpp
+++ clang/test/Frontend/remarks-hotness.cpp
@@ -21,14 +21,14 @@
   return 2;
 }
 
-// REMARKS: _Z7callee1v inlined into _Z7caller1v
-// HOT_CALL: _Z7callee1v inlined into _Z7caller1v
+// REMARKS: '_Z7callee1v' inlined into '_Z7caller1v'
+// HOT_CALL: '_Z7callee1v' inlined into '_Z7caller1v'
 int caller1() {
   return callee1();
 }
 
-// REMARKS: _Z7callee2v not inlined into _Z7caller2v
-// HOT_CALL-NOT: _Z7callee2v not inlined into _Z7caller2v
+// REMARKS: '_Z7callee2v' not inlined into '_Z7caller2v'
+// HOT_CALL-NOT: '_Z7callee2v' not inlined into '_Z7caller2v'
 int caller2() {
   return callee2();
 }
Index: clang/test/Frontend/optimization-remark.c
===================================================================
--- clang/test/Frontend/optimization-remark.c
+++ clang/test/Frontend/optimization-remark.c
@@ -55,8 +55,8 @@
 // twice.
 //
 int bar(int j) {
-// expected-remark@+3 {{foz not inlined into bar because it should never be inlined (cost=never)}}
-// expected-remark@+2 {{foz not inlined into bar because it should never be inlined (cost=never)}}
-// expected-remark@+1 {{foo inlined into bar}}
+// expected-remark@+3 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
+// expected-remark@+2 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
+// expected-remark@+1 {{'foo' inlined into 'bar'}}
   return foo(j, j - 2) * foz(j - 2, j);
 }
Index: clang/test/Frontend/optimization-remark-with-hotness.c
===================================================================
--- clang/test/Frontend/optimization-remark-with-hotness.c
+++ clang/test/Frontend/optimization-remark-with-hotness.c
@@ -60,19 +60,19 @@
 int sum = 0;
 
 void bar(int x) {
-  // HOTNESS_OFF: foo inlined into bar
+  // HOTNESS_OFF: 'foo' inlined into 'bar'
   // HOTNESS_OFF-NOT: hotness:
   // THRESHOLD-NOT: inlined
   // THRESHOLD-NOT: hotness
   // NO_PGO: '-fdiagnostics-show-hotness' requires profile-guided optimization information
   // NO_PGO: '-fdiagnostics-hotness-threshold=' requires profile-guided optimization information
-  // expected-remark@+1 {{foo inlined into bar with (cost=always): always inliner at callsite bar:8:10; (hotness:}}
+  // expected-remark@+1 {{'foo' inlined into 'bar' with (cost=always): always inliner at callsite bar:8:10; (hotness:}}
   sum += foo(x, x - 2);
 }
 
 int main(int argc, const char *argv[]) {
   for (int i = 0; i < 30; i++)
-    // expected-remark@+1 {{bar not inlined into main because it should never be inlined (cost=never): no alwaysinline attribute (hotness:}}
+    // expected-remark@+1 {{'bar' not inlined into 'main' because it should never be inlined (cost=never): no alwaysinline attribute (hotness:}}
     bar(argc);
   return sum;
 }
Index: clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
===================================================================
--- clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
+++ clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
@@ -67,19 +67,19 @@
 int sum = 0;
 
 void bar(int x) {
-  // HOTNESS_OFF: foo inlined into bar
+  // HOTNESS_OFF: 'foo' inlined into 'bar'
   // HOTNESS_OFF-NOT: hotness:
   // THRESHOLD-NOT: inlined
   // THRESHOLD-NOT: hotness
   // NO_PGO: '-fdiagnostics-show-hotness' requires profile-guided optimization information
   // NO_PGO: '-fdiagnostics-hotness-threshold=' requires profile-guided optimization information
-  // expected-remark@+1 {{foo inlined into bar with (cost=always): always inline attribute at callsite bar:8:10; (hotness:}}
+  // expected-remark@+1 {{'foo' inlined into 'bar' with (cost=always): always inline attribute at callsite bar:8:10; (hotness:}}
   sum += foo(x, x - 2);
 }
 
 int main(int argc, const char *argv[]) {
   for (int i = 0; i < 30; i++)
-    // expected-remark@+1 {{bar inlined into main with}}
+    // expected-remark@+1 {{'bar' inlined into 'main' with}}
     bar(argc);
   return sum;
 }
Index: clang/test/Frontend/optimization-remark-new-pm.c
===================================================================
--- clang/test/Frontend/optimization-remark-new-pm.c
+++ clang/test/Frontend/optimization-remark-new-pm.c
@@ -14,7 +14,7 @@
 // twice.
 //
 int bar(int j) {
-  // expected-remark@+2 {{foz not inlined into bar because it should never be inlined (cost=never)}}
-  // expected-remark@+1 {{foo inlined into bar}}
+  // expected-remark@+2 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
+  // expected-remark@+1 {{'foo' inlined into 'bar'}}
   return foo(j, j - 2) * foz(j - 2, j);
 }
Index: clang/test/Frontend/optimization-remark-line-directive.c
===================================================================
--- clang/test/Frontend/optimization-remark-line-directive.c
+++ clang/test/Frontend/optimization-remark-line-directive.c
@@ -11,6 +11,6 @@
 int foo(int x, int y) __attribute__((always_inline));
 int foo(int x, int y) { return x + y; }
 
-// expected-remark@+2 {{foo inlined into bar}} expected-note@+2 {{could not determine the original source location for /bad/path/to/original.c:1230:25}}
+// expected-remark@+2 {{'foo' inlined into 'bar'}} expected-note@+2 {{could not determine the original source location for /bad/path/to/original.c:1230:25}}
 #line 1230 "/bad/path/to/original.c"
 int bar(int j) { return foo(j, j - 2); }
Index: clang/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
===================================================================
--- clang/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
+++ clang/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
@@ -16,9 +16,11 @@
 ; YAML-NEXT: Function:        main
 ; YAML-NEXT: Hotness:         300
 ; YAML-NEXT: Args:
+; YAML-NEXT:   - String:          ''''
 ; YAML-NEXT:   - Callee:          tinkywinky
-; YAML-NEXT:   - String:          ' inlined into '
+; YAML-NEXT:   - String:          ''' inlined into '''
 ; YAML-NEXT:   - Caller:          main
+; YAML-NEXT:   - String:          ''''
 ; YAML-NEXT:   - String:          ' with '
 ; YAML-NEXT:   - String:          '(cost='
 ; YAML-NEXT:   - Cost:            '0'
@@ -30,7 +32,7 @@
 ; Next try with pass remarks to stderr
 ; RUN: %clang -target x86_64-scei-ps4 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -Rpass=inline -fdiagnostics-show-hotness -o %t2.o -c 2>&1 | FileCheck %s
 
-; CHECK: tinkywinky inlined into main with (cost=0, threshold=337) (hotness: 300)
+; CHECK: 'tinkywinky' inlined into 'main' with (cost=0, threshold=337) (hotness: 300)
 
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to