forked from OSchip/llvm-project
[clang] Fix tests for Emitting Single Inline Remark
Summary: This change depends on https://reviews.llvm.org/D36054 and should be landed at the same time. Reviewers: anemet Reviewed By: anemet Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36949 llvm-svn: 311347
This commit is contained in:
parent
3c3e1b0b54
commit
2307905561
|
@ -56,8 +56,7 @@ void bar(int x) {
|
||||||
// THRESHOLD-NOT: hotness
|
// THRESHOLD-NOT: hotness
|
||||||
// NO_PGO: '-fdiagnostics-show-hotness' requires profile-guided optimization information
|
// NO_PGO: '-fdiagnostics-show-hotness' requires profile-guided optimization information
|
||||||
// NO_PGO: '-fdiagnostics-hotness-threshold=' requires profile-guided optimization information
|
// NO_PGO: '-fdiagnostics-hotness-threshold=' requires profile-guided optimization information
|
||||||
// expected-remark@+2 {{foo should always be inlined (cost=always) (hotness: 30)}}
|
// expected-remark@+1 {{foo inlined into bar with cost=always}}
|
||||||
// expected-remark@+1 {{foo inlined into bar (hotness: 30)}}
|
|
||||||
sum += foo(x, x - 2);
|
sum += foo(x, x - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,8 @@ float foz(int x, int y) { return x * y; }
|
||||||
// twice.
|
// twice.
|
||||||
//
|
//
|
||||||
int bar(int j) {
|
int bar(int j) {
|
||||||
// expected-remark@+4 {{foz not inlined into bar because it should never be inlined (cost=never)}}
|
|
||||||
// expected-remark@+3 {{foz not inlined into bar because it should never be inlined (cost=never)}}
|
// expected-remark@+3 {{foz not inlined into bar because it should never be inlined (cost=never)}}
|
||||||
// expected-remark@+2 {{foo should always be inlined}}
|
// 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@+1 {{foo inlined into bar}}
|
||||||
return foo(j, j - 2) * foz(j - 2, j);
|
return foo(j, j - 2) * foz(j - 2, j);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue