[llvm] 76093b1 - [InlineAdvisor] Add single quotes around caller/callee names

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 10 11:51:37 PDT 2021


Author: Fangrui Song
Date: 2021-08-10T11:51:31-07:00
New Revision: 76093b17394af6f1bbe12d1fcf14ecbeb0a869df

URL: https://github.com/llvm/llvm-project/commit/76093b17394af6f1bbe12d1fcf14ecbeb0a869df
DIFF: https://github.com/llvm/llvm-project/commit/76093b17394af6f1bbe12d1fcf14ecbeb0a869df.diff

LOG: [InlineAdvisor] Add single quotes around caller/callee names

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

```
% clang -O2 -Rpass=inline -Rpass-missed=inline -S a.c
a.c:4:25: remark: 'foo' inlined into 'bar' with (cost=-30, threshold=337) at callsite bar:0:25; [-Rpass=inline]
int bar(int a) { return foo(a); }
                        ^
```

Reviewed By: hoy

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

Added: 
    

Modified: 
    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
    lld/test/ELF/lto/opt-remarks.ll
    llvm/lib/Analysis/InlineAdvisor.cpp
    llvm/lib/Analysis/ReplayInlineAdvisor.cpp
    llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
    llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll
    llvm/test/LTO/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/Inputs/cgscc-inline-replay.txt
    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/Inputs/inline-replay.txt
    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/pseudo-probe-inline.ll
    llvm/test/Transforms/SampleProfile/remarks-hotness.ll
    llvm/test/Transforms/SampleProfile/remarks.ll
    llvm/test/tools/gold/X86/opt-remarks.ll
    llvm/test/tools/gold/X86/remarks.ll

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll b/clang/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
index 5033203765c69..7fe601988e228 100644
--- a/clang/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
+++ b/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"

diff  --git a/clang/test/Frontend/optimization-remark-line-directive.c b/clang/test/Frontend/optimization-remark-line-directive.c
index 59f600125860b..13a197c109a5f 100644
--- a/clang/test/Frontend/optimization-remark-line-directive.c
+++ b/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 at +2 {{foo inlined into bar}} expected-note at +2 {{could not determine the original source location for /bad/path/to/original.c:1230:25}}
+// expected-remark at +2 {{'foo' inlined into 'bar'}} expected-note at +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); }

diff  --git a/clang/test/Frontend/optimization-remark-new-pm.c b/clang/test/Frontend/optimization-remark-new-pm.c
index 2d89059b13e67..e2c198a305303 100644
--- a/clang/test/Frontend/optimization-remark-new-pm.c
+++ b/clang/test/Frontend/optimization-remark-new-pm.c
@@ -14,7 +14,7 @@ float foz(int x, int y) { return x * y; }
 // twice.
 //
 int bar(int j) {
-  // expected-remark at +2 {{foz not inlined into bar because it should never be inlined (cost=never)}}
-  // expected-remark at +1 {{foo inlined into bar}}
+  // expected-remark at +2 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
+  // expected-remark at +1 {{'foo' inlined into 'bar'}}
   return foo(j, j - 2) * foz(j - 2, j);
 }

diff  --git a/clang/test/Frontend/optimization-remark-with-hotness-new-pm.c b/clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
index 1ca216175605f..84fb44d86d126 100644
--- a/clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
+++ b/clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
@@ -67,19 +67,19 @@ int foo(int x, int y) { return x + y; }
 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 at +1 {{foo inlined into bar with (cost=always): always inline attribute at callsite bar:8:10; (hotness:}}
+  // expected-remark at +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 at +1 {{bar inlined into main with}}
+    // expected-remark at +1 {{'bar' inlined into 'main' with}}
     bar(argc);
   return sum;
 }

diff  --git a/clang/test/Frontend/optimization-remark-with-hotness.c b/clang/test/Frontend/optimization-remark-with-hotness.c
index 0961e6da11f41..43007b3f23303 100644
--- a/clang/test/Frontend/optimization-remark-with-hotness.c
+++ b/clang/test/Frontend/optimization-remark-with-hotness.c
@@ -60,19 +60,19 @@ int foo(int x, int y) { return x + y; }
 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 at +1 {{foo inlined into bar with (cost=always): always inliner at callsite bar:8:10; (hotness:}}
+  // expected-remark at +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 at +1 {{bar not inlined into main because it should never be inlined (cost=never): no alwaysinline attribute (hotness:}}
+    // expected-remark at +1 {{'bar' not inlined into 'main' because it should never be inlined (cost=never): no alwaysinline attribute (hotness:}}
     bar(argc);
   return sum;
 }

diff  --git a/clang/test/Frontend/optimization-remark.c b/clang/test/Frontend/optimization-remark.c
index 6f684bd3eed6e..2287693a45e40 100644
--- a/clang/test/Frontend/optimization-remark.c
+++ b/clang/test/Frontend/optimization-remark.c
@@ -55,8 +55,8 @@ float foz(int x, int y) { return x * y; }
 // twice.
 //
 int bar(int j) {
-// expected-remark at +3 {{foz not inlined into bar because it should never be inlined (cost=never)}}
-// expected-remark at +2 {{foz not inlined into bar because it should never be inlined (cost=never)}}
-// expected-remark at +1 {{foo inlined into bar}}
+// expected-remark at +3 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
+// expected-remark at +2 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
+// expected-remark at +1 {{'foo' inlined into 'bar'}}
   return foo(j, j - 2) * foz(j - 2, j);
 }

diff  --git a/clang/test/Frontend/remarks-hotness.cpp b/clang/test/Frontend/remarks-hotness.cpp
index dc24046d28fe2..f09b11eb08df5 100644
--- a/clang/test/Frontend/remarks-hotness.cpp
+++ b/clang/test/Frontend/remarks-hotness.cpp
@@ -21,14 +21,14 @@ __attribute__((noinline)) int callee2() {
   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();
 }

diff  --git a/lld/test/ELF/lto/opt-remarks.ll b/lld/test/ELF/lto/opt-remarks.ll
index a80a88213e59a..4a89dfa749eee 100644
--- a/lld/test/ELF/lto/opt-remarks.ll
+++ b/lld/test/ELF/lto/opt-remarks.ll
@@ -32,9 +32,11 @@
 ; YAML-NEXT: Name:            Inlined
 ; YAML-NEXT: Function:        main
 ; 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'
@@ -49,9 +51,11 @@
 ; YAML-HOT-NEXT: Function:        main
 ; YAML-HOT-NEXT: Hotness:         300
 ; YAML-HOT-NEXT: Args:
+; YAML-HOT-NEXT:   - String:          ''''
 ; YAML-HOT-NEXT:   - Callee:          tinkywinky
-; YAML-HOT-NEXT:   - String:          ' inlined into '
+; YAML-HOT-NEXT:   - String:          ''' inlined into '''
 ; YAML-HOT-NEXT:   - Caller:          main
+; YAML-HOT-NEXT:   - String:          ''''
 ; YAML-HOT-NEXT:   - String:          ' with '
 ; YAML-HOT-NEXT:   - String:          '(cost='
 ; YAML-HOT-NEXT:   - Cost:            '0'

diff  --git a/llvm/lib/Analysis/InlineAdvisor.cpp b/llvm/lib/Analysis/InlineAdvisor.cpp
index a8ad2d6696bfd..363b81a55060e 100644
--- a/llvm/lib/Analysis/InlineAdvisor.cpp
+++ b/llvm/lib/Analysis/InlineAdvisor.cpp
@@ -56,9 +56,9 @@ void DefaultInlineAdvice::recordUnsuccessfulInliningImpl(
                                          "; " + inlineCostStr(*OIC));
   ORE.emit([&]() {
     return OptimizationRemarkMissed(DEBUG_TYPE, "NotInlined", DLoc, Block)
-           << NV("Callee", Callee) << " will not be inlined into "
-           << NV("Caller", Caller) << ": "
-           << NV("Reason", Result.getFailureReason());
+           << "'" << NV("Callee", Callee) << "' is not inlined into '"
+           << "'" << NV("Caller", Caller)
+           << "': " << NV("Reason", Result.getFailureReason());
   });
 }
 
@@ -343,15 +343,15 @@ llvm::shouldInline(CallBase &CB,
     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;
       });
     }
@@ -368,9 +368,9 @@ llvm::shouldInline(CallBase &CB,
     ORE.emit([&]() {
       return OptimizationRemarkMissed(DEBUG_TYPE, "IncreaseCostInOtherContexts",
                                       Call)
-             << "Not inlining. Cost of inlining " << NV("Callee", Callee)
-             << " increases the cost of inlining " << NV("Caller", Caller)
-             << " in other contexts";
+             << "Not inlining. Cost of inlining '" << NV("Callee", Callee)
+             << "' increases the cost of inlining '" << NV("Caller", Caller)
+             << "' in other contexts";
     });
     setInlineRemark(CB, "deferred");
     // IC does not bool() to false, so get an InlineCost that will.
@@ -444,8 +444,8 @@ void llvm::emitInlinedInto(OptimizationRemarkEmitter &ORE, DebugLoc DLoc,
     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;

diff  --git a/llvm/lib/Analysis/ReplayInlineAdvisor.cpp b/llvm/lib/Analysis/ReplayInlineAdvisor.cpp
index b9dac2f3ff113..c4e1d3fad3bba 100644
--- a/llvm/lib/Analysis/ReplayInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/ReplayInlineAdvisor.cpp
@@ -36,15 +36,16 @@ ReplayInlineAdvisor::ReplayInlineAdvisor(
   }
 
   // Example for inline remarks to parse:
-  //   main:3:1.1: _Z3subii inlined into main at callsite sum:1 @ main:3:1.1
+  //   main:3:1.1: '_Z3subii' inlined into 'main' at callsite sum:1 @ main:3:1.1
   // We use the callsite string after `at callsite` to replay inlining.
   line_iterator LineIt(*BufferOrErr.get(), /*SkipBlanks=*/true);
   for (; !LineIt.is_at_eof(); ++LineIt) {
     StringRef Line = *LineIt;
     auto Pair = Line.split(" at callsite ");
 
-    auto Callee = Pair.first.split(" inlined into").first.rsplit(": ").second;
-
+    StringRef Callee = Pair.first.split(" inlined into")
+                           .first.rsplit(": '")
+                           .second.drop_back();
     auto CallSite = Pair.second.split(";").first;
 
     if (Callee.empty() || CallSite.empty())

diff  --git a/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll b/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
index 12eed897d94dd..d6465e58f3bea 100644
--- a/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
+++ b/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
@@ -58,9 +58,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:            '-15000'
@@ -69,7 +71,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"

diff  --git a/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll b/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll
index bc3227017f9b6..a7a41b87f0f36 100644
--- a/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll
+++ b/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll
@@ -25,9 +25,11 @@
 ; YAML-NEXT: Name:            Inlined
 ; YAML-NEXT: Function:        main
 ; 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:            '-15000'

diff  --git a/llvm/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll b/llvm/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll
index 96a6718163fe0..04c7a4537414c 100644
--- a/llvm/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll
+++ b/llvm/test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll
@@ -26,9 +26,11 @@
 ; YAML-NEXT: Function:        main
 ; YAML-NEXT: Hotness:         300
 ; YAML-NEXT: Args:
+; YAML-NEXT:   - String:          ''''
 ; YAML-NEXT:   - Callee:          foo
-; 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:            '-15000'

diff  --git a/llvm/test/LTO/X86/diagnostic-handler-remarks.ll b/llvm/test/LTO/X86/diagnostic-handler-remarks.ll
index f38293db93e1c..1b33370d4a04b 100644
--- a/llvm/test/LTO/X86/diagnostic-handler-remarks.ll
+++ b/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:
@@ -56,9 +56,11 @@
 ; YAML-NEXT: Name:            Inlined
 ; YAML-NEXT: Function:        main
 ; YAML-NEXT: Args:
+; YAML-NEXT:   - String:          ''''
 ; YAML-NEXT:   - Callee:          foo
-; 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:            '-15000'

diff  --git a/llvm/test/Other/optimization-remarks-auto.ll b/llvm/test/Other/optimization-remarks-auto.ll
index cdedefce78a83..e5447012acfe9 100644
--- a/llvm/test/Other/optimization-remarks-auto.ll
+++ b/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

diff  --git a/llvm/test/Other/optimization-remarks-inline.ll b/llvm/test/Other/optimization-remarks-inline.ll
index bc2200545bb0a..3e51ac113b15c 100644
--- a/llvm/test/Other/optimization-remarks-inline.ll
+++ b/llvm/test/Other/optimization-remarks-inline.ll
@@ -32,8 +32,8 @@ entry:
   %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
 }
 

diff  --git a/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll b/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
index 635f860f57735..937b825c80b5a 100644
--- a/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
+++ b/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'

diff  --git a/llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll b/llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll
index b09b9def015d0..ee6195382fff3 100644
--- a/llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll
+++ b/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'

diff  --git a/llvm/test/Transforms/Inline/ARM/inline-fp.ll b/llvm/test/Transforms/Inline/ARM/inline-fp.ll
index 1d74dfd15b187..0f05ec6f971e0 100644
--- a/llvm/test/Transforms/Inline/ARM/inline-fp.ll
+++ b/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)

diff  --git a/llvm/test/Transforms/Inline/Inputs/cgscc-inline-replay.txt b/llvm/test/Transforms/Inline/Inputs/cgscc-inline-replay.txt
index 3d6b588f8c1ea..1cf30edce69b1 100644
--- a/llvm/test/Transforms/Inline/Inputs/cgscc-inline-replay.txt
+++ b/llvm/test/Transforms/Inline/Inputs/cgscc-inline-replay.txt
@@ -1,2 +1,2 @@
-remark: calls.cc:10:0: _Z3sumii inlined into main with (cost=45, threshold=337) at callsite main:3:0.1;
-remark: calls.cc:4:0: _Z3subii inlined into main with (cost=-5, threshold=337) at callsite _Z3sumii:1:0 @ main:3:0.1;
+remark: calls.cc:10:0: '_Z3sumii' inlined into 'main' with (cost=45, threshold=337) at callsite main:3:0.1;
+remark: calls.cc:4:0: '_Z3subii' inlined into 'main' with (cost=-5, threshold=337) at callsite _Z3sumii:1:0 @ main:3:0.1;

diff  --git a/llvm/test/Transforms/Inline/cgscc-inline-replay.ll b/llvm/test/Transforms/Inline/cgscc-inline-replay.ll
index 15846d4382a5d..82f4fc20bad20 100644
--- a/llvm/test/Transforms/Inline/cgscc-inline-replay.ll
+++ b/llvm/test/Transforms/Inline/cgscc-inline-replay.ll
@@ -110,10 +110,10 @@ attributes #0 = { "use-sample-profile" }
 !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'

diff  --git a/llvm/test/Transforms/Inline/inline_noprofile.ll b/llvm/test/Transforms/Inline/inline_noprofile.ll
index dd023b20126fe..b8e579708946e 100644
--- a/llvm/test/Transforms/Inline/inline_noprofile.ll
+++ b/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 }

diff  --git a/llvm/test/Transforms/Inline/inline_nossp.ll b/llvm/test/Transforms/Inline/inline_nossp.ll
index 24fdab0b9f13b..c7145c8e4a7d5 100644
--- a/llvm/test/Transforms/Inline/inline_nossp.ll
+++ b/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 }

diff  --git a/llvm/test/Transforms/Inline/optimization-remarks-hotness-threshold.ll b/llvm/test/Transforms/Inline/optimization-remarks-hotness-threshold.ll
index 9299b2c6a29a1..759b23dc2cffc 100644
--- a/llvm/test/Transforms/Inline/optimization-remarks-hotness-threshold.ll
+++ b/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'

diff  --git a/llvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll b/llvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll
index 12250b463a097..a669a435c7958 100644
--- a/llvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll
+++ b/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
@@ -31,11 +31,13 @@
 ; YAML-NEXT: Function:        bar
 ; YAML-NEXT: Hotness:         30
 ; YAML-NEXT: Args:
+; YAML-NEXT:   - String: ''''
 ; YAML-NEXT:   - Callee: foo
 ; YAML-NEXT:     DebugLoc:        { File: '/tmp/s.c', Line: 1, Column: 0 }
-; YAML-NEXT:   - String: ' inlined into '
+; YAML-NEXT:   - String: ''' inlined into '''
 ; YAML-NEXT:   - Caller: bar
 ; YAML-NEXT:     DebugLoc:        { File: '/tmp/s.c', Line: 3, Column: 0 }
+; YAML-NEXT:   - String: ''''
 ; YAML-NEXT:   - String: ' with '
 ; YAML-NEXT:   - String: '(cost='
 ; YAML-NEXT:   - Cost: '{{[0-9\-]+}}'

diff  --git a/llvm/test/Transforms/Inline/optimization-remarks-with-hotness.ll b/llvm/test/Transforms/Inline/optimization-remarks-with-hotness.ll
index 5bdca952577e5..22a129393ee51 100644
--- a/llvm/test/Transforms/Inline/optimization-remarks-with-hotness.ll
+++ b/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 {

diff  --git a/llvm/test/Transforms/Inline/optimization-remarks.ll b/llvm/test/Transforms/Inline/optimization-remarks.ll
index b0fd9ca3a0800..a3081a819ef52 100644
--- a/llvm/test/Transforms/Inline/optimization-remarks.ll
+++ b/llvm/test/Transforms/Inline/optimization-remarks.ll
@@ -28,8 +28,8 @@
 
 ; 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
+; 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 {

diff  --git a/llvm/test/Transforms/SampleProfile/Inputs/inline-replay.txt b/llvm/test/Transforms/SampleProfile/Inputs/inline-replay.txt
index ae920515bf5a5..9d720ec452493 100644
--- a/llvm/test/Transforms/SampleProfile/Inputs/inline-replay.txt
+++ b/llvm/test/Transforms/SampleProfile/Inputs/inline-replay.txt
@@ -1,2 +1,2 @@
-remark: calls.cc:10:0: _Z3sumii inlined into main to match profiling context with (cost=45, threshold=337) at callsite main:3:0.1;
-remark: calls.cc:4:0: _Z3subii inlined into main to match profiling context with (cost=-5, threshold=337) at callsite _Z3sumii:1:0 @ main:3:0.1;
+remark: calls.cc:10:0: '_Z3sumii' inlined into 'main' to match profiling context with (cost=45, threshold=337) at callsite main:3:0.1;
+remark: calls.cc:4:0: '_Z3subii' inlined into 'main' to match profiling context with (cost=-5, threshold=337) at callsite _Z3sumii:1:0 @ main:3:0.1;

diff  --git a/llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll b/llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
index 7b6cd545c73e6..c0b789a78b391 100644
--- a/llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
+++ b/llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
@@ -54,10 +54,10 @@ attributes #0 = {"use-sample-profile"}
 !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

diff  --git a/llvm/test/Transforms/SampleProfile/csspgo-inline.ll b/llvm/test/Transforms/SampleProfile/csspgo-inline.ll
index 8303ac2993182..0cdadf188c929 100644
--- a/llvm/test/Transforms/SampleProfile/csspgo-inline.ll
+++ b/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

diff  --git a/llvm/test/Transforms/SampleProfile/inline-replay.ll b/llvm/test/Transforms/SampleProfile/inline-replay.ll
index 976e85d160bd3..0f06104161de2 100644
--- a/llvm/test/Transforms/SampleProfile/inline-replay.ll
+++ b/llvm/test/Transforms/SampleProfile/inline-replay.ll
@@ -113,10 +113,10 @@ attributes #0 = { "use-sample-profile" }
 !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'

diff  --git a/llvm/test/Transforms/SampleProfile/pseudo-probe-inline.ll b/llvm/test/Transforms/SampleProfile/pseudo-probe-inline.ll
index 055d41792290d..3f7dfcfab121f 100644
--- a/llvm/test/Transforms/SampleProfile/pseudo-probe-inline.ll
+++ b/llvm/test/Transforms/SampleProfile/pseudo-probe-inline.ll
@@ -79,11 +79,13 @@ if.end:
 ;YAML-NEXT:  DebugLoc:        { File: test.cpp, Line: 10, Column: 11 }
 ;YAML-NEXT:  Function:        foo
 ;YAML-NEXT:  Args:
+;YAML-NEXT:    - String:          ''''
 ;YAML-NEXT:    - Callee:          zen
 ;YAML-NEXT:      DebugLoc:        { File: test.cpp, Line: 38, Column: 0 }
-;YAML-NEXT:    - String:          ' inlined into '
+;YAML-NEXT:    - String:          ''' inlined into '''
 ;YAML-NEXT:    - Caller:          foo
 ;YAML-NEXT:      DebugLoc:        { File: test.cpp, Line: 9, Column: 0 }
+;YAML-NEXT:    - String:          ''''
 ;YAML-NEXT:    - String:          ' to match profiling context'
 ;YAML-NEXT:    - String:          ' with '
 ;YAML-NEXT:    - String:          '(cost='

diff  --git a/llvm/test/Transforms/SampleProfile/remarks-hotness.ll b/llvm/test/Transforms/SampleProfile/remarks-hotness.ll
index c1f1fd70051ca..3ef3a49b69c14 100644
--- a/llvm/test/Transforms/SampleProfile/remarks-hotness.ll
+++ b/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"

diff  --git a/llvm/test/Transforms/SampleProfile/remarks.ll b/llvm/test/Transforms/SampleProfile/remarks.ll
index 46f016433b207..b32ea8620b54c 100644
--- a/llvm/test/Transforms/SampleProfile/remarks.ll
+++ b/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
@@ -37,11 +37,13 @@
 ;YAML-NEXT:  DebugLoc:        { File: remarks.cc, Line: 13, Column: 21 }
 ;YAML-NEXT:  Function:        main
 ;YAML-NEXT:  Args:
+;YAML-NEXT:    - String:          ''''
 ;YAML-NEXT:    - Callee:          _Z3foov
 ;YAML-NEXT:      DebugLoc:        { File: remarks.cc, Line: 3, Column: 0 }
-;YAML-NEXT:    - String:          ' inlined into '
+;YAML-NEXT:    - String:          ''' inlined into '
 ;YAML-NEXT:    - Caller:          main
 ;YAML-NEXT:        DebugLoc:        { File: remarks.cc, Line: 13, Column: 0 }
+;YAML-NEXT:    - String:          ''''
 ;YAML-NEXT:    - String:          ' to match profiling context'
 ;YAML-NEXT:    - String:          ' with '
 ;YAML-NEXT:    - String:          '(cost='
@@ -63,11 +65,13 @@
 ;YAML-NEXT:  DebugLoc:        { File: remarks.cc, Line: 9, Column: 19 }
 ;YAML-NEXT:  Function:        main
 ;YAML-NEXT:  Args:
+;YAML-NEXT:    - String:          ''''
 ;YAML-NEXT:    - Callee:          rand
 ;YAML-NEXT:      DebugLoc:        { File: remarks.cc, Line: 90, Column: 0 }
-;YAML-NEXT:    - String:          ' inlined into '
+;YAML-NEXT:    - String:          ''' inlined into '''
 ;YAML-NEXT:    - Caller:          main
 ;YAML-NEXT:      DebugLoc:        { File: remarks.cc, Line: 13, Column: 0 }
+;YAML-NEXT:    - String:          ''''
 ;YAML-NEXT:    - String:          ' to match profiling context'
 ;YAML-NEXT:    - String:          ' with '
 ;YAML-NEXT:    - String:          '(cost=always)'

diff  --git a/llvm/test/tools/gold/X86/opt-remarks.ll b/llvm/test/tools/gold/X86/opt-remarks.ll
index bbd564bfa0578..fceca23d532b3 100644
--- a/llvm/test/tools/gold/X86/opt-remarks.ll
+++ b/llvm/test/tools/gold/X86/opt-remarks.ll
@@ -49,9 +49,11 @@
 ; YAML-NEXT: Name:            Inlined
 ; YAML-NEXT: Function:        _start
 ; YAML-NEXT: Args:
+; YAML-NEXT:   - String:          ''''
 ; YAML-NEXT:   - Callee:          f
-; YAML-NEXT:   - String:          ' inlined into '
+; YAML-NEXT:   - String:          ''' inlined into '''
 ; YAML-NEXT:   - Caller:          _start
+; YAML-NEXT:   - String:          ''''
 ; YAML-NEXT:   - String:          ' with '
 ; YAML-NEXT:   - String:          '(cost='
 ; YAML-NEXT:   - Cost:            '0'
@@ -66,9 +68,11 @@
 ; YAML-HOT-NEXT: Function:        _start
 ; YAML-HOT-NEXT: Hotness:         300
 ; YAML-HOT-NEXT: Args:
+; YAML-HOT-NEXT:   - String:          ''''
 ; YAML-HOT-NEXT:   - Callee:          f
-; YAML-HOT-NEXT:   - String:          ' inlined into '
+; YAML-HOT-NEXT:   - String:          ''' inlined into '''
 ; YAML-HOT-NEXT:   - Caller:          _start
+; YAML-HOT-NEXT:   - String:          ''''
 ; YAML-HOT-NEXT:   - String:          ' with '
 ; YAML-HOT-NEXT:   - String:          '(cost='
 ; YAML-HOT-NEXT:   - Cost:            '0'

diff  --git a/llvm/test/tools/gold/X86/remarks.ll b/llvm/test/tools/gold/X86/remarks.ll
index d1bbe46157f45..316cbf8148a8c 100644
--- a/llvm/test/tools/gold/X86/remarks.ll
+++ b/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"


        


More information about the llvm-commits mailing list