Skip to content

Commit

Permalink
Provide reason messages for unviable inlining
Browse files Browse the repository at this point in the history
InlineCost's isInlineViable() is changed to return InlineResult
instead of bool. This provides messages for failure reasons and
allows to get more specific messages for cases where callsites
are not viable for inlining.

Reviewed By: xbolva00, anemet

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352849 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Yevgeny Rouban committed Feb 1, 2019
1 parent 4cdc67a commit 07d269d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/Frontend/optimization-remark-with-hotness.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void bar(int x) {

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): always inliner (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;
}

0 comments on commit 07d269d

Please sign in to comment.