diff options
author | David Bolvansky <david.bolvansky@gmail.com> | 2018-08-05 14:53:34 +0000 |
---|---|---|
committer | David Bolvansky <david.bolvansky@gmail.com> | 2018-08-05 14:53:34 +0000 |
commit | 074cccc152df061007c8500515698b57a5af7103 (patch) | |
tree | b5cf27091376ac17ff3d1eec265474e1e0a84d83 | |
parent | c253d853d64e19673776a262cd7fe8905050e43f (diff) | |
download | clang-074cccc152df061007c8500515698b57a5af7103.tar.gz |
Fix tests for changed opt remarks format
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
-rw-r--r-- | test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll | 7 | ||||
-rw-r--r-- | test/Frontend/optimization-remark-with-hotness.c | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll b/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll index 09a2ec890f..2d25930e50 100644 --- a/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll +++ b/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll @@ -19,9 +19,10 @@ ; 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" diff --git a/test/Frontend/optimization-remark-with-hotness.c b/test/Frontend/optimization-remark-with-hotness.c index 6d3ab0697a..150b7324da 100644 --- a/test/Frontend/optimization-remark-with-hotness.c +++ b/test/Frontend/optimization-remark-with-hotness.c @@ -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; } |