This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Support filtering by hotness threshold
ClosedPublic

Authored by anemet on Dec 20 2017, 2:10 PM.

Details

Summary

This wires up -pass-remarks-hotness-threshold to LTO and ThinLTO.

Next is to change the clang driver to pass this
with -fdiagnostics-hotness-threshold.

Diff Detail

Repository
rL LLVM

Event Timeline

anemet created this revision.Dec 20 2017, 2:10 PM
mehdi_amini accepted this revision.Jan 10 2018, 6:22 AM

LGTM

test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
21 ↗(On Diff #127784)

The pipe and the line break on the last line don't make much sense to me?

This revision is now accepted and ready to land.Jan 10 2018, 6:22 AM
This revision was automatically updated to reflect the committed changes.

I reverted this commit in r326975 because it failed ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll.

FAIL: LLVM :: ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll (1 of 1)
******************** TEST 'LLVM :: ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll' FAILED ********************
Script:
--
/usr/local/google/home/inglorion/clang/bin/opt -module-summary /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/diagnostic-handle
r-remarks-with-hotness.ll -o /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp1.bc
/usr/local/google/home/inglorion/clang/bin/opt -module-summary /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/Inputs/diagnostic
-handler-remarks.ll -o /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp2.bc
/usr/local/google/home/inglorion/clang/bin/llvm-lto -thinlto-action=run           -lto-pass-remarks-output=/usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-no-th.yaml           -lto-pass-remarks-with-hotness           -
exported-symbol _func2           -exported-symbol _main /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-re
marks-with-hotness.ll.tmp1.bc /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp2.bc 2>&1 |      /usr/local/google/home/inglorion/clang/bin/FileCheck /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/diagnostic-
handler-remarks-with-hotness.ll -allow-empty
/usr/local/google/home/inglorion/clang/bin/llvm-lto -thinlto-action=run           -lto-pass-remarks-output=/usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-low-th.yaml           -lto-pass-remarks-with-hotness
-lto-pass-remarks-hotness-threshold=20           -exported-symbol _func2           -exported-symbol _main /usr/local/google/home/inglorion/c
lang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp1.bc /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Outp
ut/diagnostic-handler-remarks-with-hotness.ll.tmp2.bc 2>&1 |  /usr/local/google/home/inglorion/clang/bin/llvm-lto -thinlto-action=run
    -lto-pass-remarks-output=/usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-h
igh-th.yaml           -lto-pass-remarks-with-hotness           -lto-pass-remarks-hotness-threshold=100           -exported-symbol _func2
       -exported-symbol _main /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp1
.bc /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp2.bc 2>&1 |  cat /usr/local
/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-no-th.yaml.thin.0.yaml | /usr/local/goog
le/home/inglorion/clang/bin/FileCheck /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
 -check-prefix=YAML1
cat /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-low-th.yaml.thin.0.yaml |
/usr/local/google/home/inglorion/clang/bin/FileCheck /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-
with-hotness.ll -check-prefix=YAML1
cat /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-high-th.yaml.thin.0.yaml |
 /usr/local/google/home/inglorion/clang/bin/FileCheck /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/diagnostic-handler-remarks
-with-hotness.ll -allow-empty -check-prefix=YAML1_TH_HIGH
cat /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-no-th.yaml.thin.1.yaml | /
usr/local/google/home/inglorion/clang/bin/FileCheck /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-w
ith-hotness.ll -check-prefix=YAML2
cat /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-low-th.yaml.thin.1.yaml |
/usr/local/google/home/inglorion/clang/bin/FileCheck /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-
with-hotness.ll -allow-empty -check-prefix=YAML2_TH_HIGH
cat /usr/local/google/home/inglorion/clang/test/ThinLTO/X86/Output/diagnostic-handler-remarks-with-hotness.ll.tmp-high-th.yaml.thin.1.yaml |
 /usr/local/google/home/inglorion/clang/bin/FileCheck /usr/local/google/home/inglorion/llvm/llvm/test/ThinLTO/X86/diagnostic-handler-remarks
-with-hotness.ll -allow-empty -check-prefix=YAML2_TH_HIGH
--
Exit Code: 1

@inglorion Is this from a bot, I didn't see any failures? A bit more info would be helpful.

Is this from a bot? A bit more info would be helpful.

@inglorion, I am inclined to recommit this unless I hear from you in a few days:

  1. you reverted without the usual prior notice to provide time to fix
  2. looks like this does not happen on a public bot
  3. you failed to provide sufficient information to reproduce.

Hope to hear from you.

Adam