diff options
| author | David Bolvansky <david.bolvansky@gmail.com> | 2018-07-31 14:25:24 +0000 |
|---|---|---|
| committer | David Bolvansky <david.bolvansky@gmail.com> | 2018-07-31 14:25:24 +0000 |
| commit | b562dbabdad4f4842b7eb20c44cdf9e25bd5af54 (patch) | |
| tree | 49f12546edbe9e5dc16c80507e919eb677aa9513 /llvm/test/LTO/Resolution/X86 | |
| parent | 4a31bcff3f6574b4ad2ad48282d5fb85b1cb27c1 (diff) | |
| download | bcm5719-llvm-b562dbabdad4f4842b7eb20c44cdf9e25bd5af54.tar.gz bcm5719-llvm-b562dbabdad4f4842b7eb20c44cdf9e25bd5af54.zip | |
Enrich inline messages
Summary:
This patch improves Inliner to provide causes/reasons for negative inline decisions.
1. It adds one new message field to InlineCost to report causes for Always and Never instances. All Never and Always instantiations must provide a simple message.
2. Several functions that used to return the inlining results as boolean are changed to return InlineResult which carries the cause for negative decision.
3. Changed remark priniting and debug output messages to provide the additional messages and related inline cost.
4. Adjusted tests for changed printing.
Patch by: yrouban (Yevgeny Rouban)
Reviewers: craig.topper, sammccall, sgraenitz, NutshellySima, shchenz, chandlerc, apilipenko, javed.absar, tejohnson, dblaikie, sanjoy, eraman, xbolva00
Reviewed By: tejohnson, xbolva00
Subscribers: xbolva00, llvm-commits, arsenm, mehdi_amini, eraman, haicheng, steven_wu, dexonsmith
Differential Revision: https://reviews.llvm.org/D49412
llvm-svn: 338387
Diffstat (limited to 'llvm/test/LTO/Resolution/X86')
| -rw-r--r-- | llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll | 7 | ||||
| -rw-r--r-- | llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll | 5 |
2 files changed, 7 insertions, 5 deletions
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 c45dd4bcd0e..9932f527dc6 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 @@ -25,14 +25,15 @@ ; 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: '-15000' -; YAML-NEXT: - String: ' (threshold=' +; YAML-NEXT: - String: ', threshold=' ; YAML-NEXT: - Threshold: '337' ; 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-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 8a3c97a8438..03db4a722b5 100644 --- a/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll +++ b/llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll @@ -26,9 +26,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: '-15000' -; YAML-NEXT: - String: ' (threshold=' +; YAML-NEXT: - String: ', threshold=' ; YAML-NEXT: - Threshold: '337' ; YAML-NEXT: - String: ')' ; YAML-NEXT: ... |

