]> granicus.if.org Git - clang/commitdiff
Fix tests for changed opt remarks format
authorDavid Bolvansky <david.bolvansky@gmail.com>
Sun, 5 Aug 2018 14:53:34 +0000 (14:53 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Sun, 5 Aug 2018 14:53:34 +0000 (14:53 +0000)
Summary:
Optimization remark format is slightly changed by LLVM patch D49412.
Two tests are fixed with expected messages changed.
Frankly speaking I have not tested this change yet. I will test when manage to setup the project.

Reviewers: xbolva00

Reviewed By: xbolva00

Subscribers: mehdi_amini, eraman, steven_wu, dexonsmith

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

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

test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
test/Frontend/optimization-remark-with-hotness.c

index 09a2ec890ff9999183448acde3a230745b8f66db..2d25930e508ba92388332e5d7f82d1f9796acac6 100644 (file)
 ; YAML-NEXT:   - Callee:          tinkywinky
 ; YAML-NEXT:   - String:          ' inlined into '
 ; YAML-NEXT:   - Caller:          main
-; YAML-NEXT:   - String:          ' with cost='
+; YAML-NEXT:   - String:          ' with '
+; YAML-NEXT:   - String:          '(cost='
 ; YAML-NEXT:   - Cost:            '0'
-; YAML-NEXT:   - String:          ' (threshold='
+; YAML-NEXT:   - String:          'threshold='
 ; YAML-NEXT:   - Threshold:       '337'
 ; YAML-NEXT:   - String:          ')'
 ; YAML-NEXT: ...
@@ -29,7 +30,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 -mllvm -pass-remarks=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-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
index 6d3ab0697a213c789529c23a43f4223e727de901..150b7324da5e3a48cd93cc9af058b670a1711376 100644 (file)
@@ -60,13 +60,13 @@ void bar(int x) {
   // 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 (hotness:}}
+  // expected-remark@+1 {{foo inlined into bar with (cost=always): always inliner (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) (hotness:}}
+    // expected-remark@+1 {{bar not inlined into main because it should never be inlined (cost=never): always inliner (hotness:}}
     bar(argc);
   return sum;
 }