Rework workaround for GCC regarding -fno-lifetime-dse
Describe the bug
https://github.com/llvm/llvm-project/issues/24952 is causing failures in sycl-ls, so we have to revert https://github.com/intel/llvm/commit/6ac63129b7ef3413c9f86b81e9d33a619f94f911 and apply workarounds in https://github.com/intel/llvm/commit/e676cb09f0b23ec572fefe09aa7882876797eb79.
bader left a comment (intel/llvm#20292) I suggest we recover https://github.com/intel/llvm/commit/6ac63129b7ef3413c9f86b81e9d33a619f94f911 and implement a workaround for sycl-ls, rather than add more changes in the community code to recover from previous community code modifications.
To reproduce
revert e676cb09f0b23ec572fefe09aa7882876797eb79 and reland 6ac63129b7ef3413c9f86b81e9d33a619f94f911 run sycl-ls, you should see SEGV.
Environment
- OS: [e.g Windows/Linux]
- Target device and vendor: [e.g. Intel GPU]
- DPC++ version: [e.g. commit hash or output of
clang++ --version] - Dependencies version: [e.g. the output of
sycl-ls --verbose]
Additional context
No response
I did a similar fix here https://github.com/intel/llvm/pull/20814, we should revert this too when this is really fixed.