Currently, when compiling with the CMake flag
TEST_SUITE_PROFILE_GENERATE set to ON, compare-fp-3.c fails to
compile as clang tries to insert instrumentation on the functions
that are supposed to get optimized out. This commit fixes this by
adding references to these functions when profile generation is
turned on so that the test suite builds without linking errors.
Details
Diff Detail
- Repository
- rT test-suite
Event Timeline
There seems to be an underlying issue in the compiler when compiling with instrumentation as identified in https://groups.google.com/g/llvm-dev/c/180LAuFPfKs. This patch is a workaround for this issue for people compiling the test suite with PGO instrumentation enabled and not just the TEST_SUITE_BENCHMARKING_ONLY set to ON. Let me know if there is a more elegant/preferred way of solving this within the test suite (Or if this patch is even desired given the fairly atypical use case of PGO with the entire test suite).
9(Reviewers pinged for commits in relevant areas (PGO CMake implementation/gcc-c-torture suite integration))
Could you instead exclude the test in the SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeLists.txt file? Given that this is source from the gcc torture suite that we may want to update again in the future, it's probably best if we can avoid custom changes in the source.
Fixed modification of gcc-c-torture suite source files by just excluding the test in the relevant CMakeLists.txt file.
LGTM
SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeLists.txt | ||
---|---|---|
38 | Should this also be excluded for PROFILE_USE for consistency? No strong opinion though, whatever works. |
Made behavior consistent between TEST_SUITE_PROFILE_GENERATE and TEST_SUITE_PROFILE_USE.
Thank you for the quick review and sharing your expertise. Is it possible for you land this commit? I don't have push access.
Thanks for doing this change in the CMakeLists - it's right we don't want to change the gcc torture suite sources, if possible.
I don't have commit access to the llvm-test-suite repository. Is it possible for someone to push this commit to the test suite repository? My details for the git commit authorship:
Aiden Grossman
agrossman154 at yahoo dot com
Should this also be excluded for PROFILE_USE for consistency?
No strong opinion though, whatever works.