LTO backend will not invoke SampleProfileLoader pass even if -fprofile-sample-use is specified. This patch passes the flag down so that pass manager can add the SampleProfileLoader pass correctly.
Details
- Reviewers
tejohnson mehdi_amini - Commits
- rGa1bd2d658570: Pass -fprofile-sample-use to lto backends.
rGbd3689de9119: Pass -fprofile-sample-use to lto backends.
rC291870: Pass -fprofile-sample-use to lto backends.
rC291774: Pass -fprofile-sample-use to lto backends.
rL291870: Pass -fprofile-sample-use to lto backends.
rL291774: Pass -fprofile-sample-use to lto backends.
Diff Detail
- Build Status
Buildable 2832 Build 2832: arc lint + arc unit
Event Timeline
The breaks some buildbots thus I reverted the patch:
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/1889
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/32242/
Unfortunately I could not reproduce the error locally.
Any quick insights why this test change would break?
Thanks,
Dehao
Looks like there was no output (at least on the buildbot that I looked at). Most likely because this is using debug output and perhaps those are build NDEBUG? I wonder if there is a better way to test this. Otherwise I think "; REQUIRES: asserts" might do the trick?
Thanks,
Dehao
Looks like it - I looked at another test that used -debug output and it requires asserts.
Thanks for the prompt response.
But looks like several other tests also has "-mllvm -debug-pass=Structure" in their tests:
tools/clang/test/CodeGen/pgo-instrumentation.c
test/CodeGen/Generic/llc-start-stop.ll
I just verified that if I cmake with -DCMAKE_BUILD_TYPE=Release, it still passes locally.
Thanks,
Dehao
Hmm, maybe that flavor of -debug output is enabled with NDEBUG then. I'm not really sure unfortunately.
I don't even see an error message for the second one, do you? Just an error code.
Thanks,
Dehao
Looks like this is still breaking these buildbots:
I reverted the test change for now, and am thinking of how to reproduce/fix the problem...
Aha - the test is missing "-target x86_64-unknown-linux-gnu". Probably because it was cloned from the one just above or below it, which are testing for other failures hit early on and didn't need it (they should probably have it as well to avoid confusion like this in the future though).