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.
- rC291870: Pass -fprofile-sample-use to lto backends.
rL291870: Pass -fprofile-sample-use to lto backends.
rC291774: Pass -fprofile-sample-use to lto backends.
rGa1bd2d658570: Pass -fprofile-sample-use to lto backends.
rL291774: Pass -fprofile-sample-use to lto backends.
rGbd3689de9119: Pass -fprofile-sample-use to lto backends.
The breaks some buildbots thus I reverted the patch:
Unfortunately I could not reproduce the error locally.
Any quick insights why this test change would break?
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 for the prompt response.
But looks like several other tests also has "-mllvm -debug-pass=Structure" in their tests:
I just verified that if I cmake with -DCMAKE_BUILD_TYPE=Release, it still passes locally.
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.
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).