[PATCH] D150505: [cmake] Disable GCC lifetime DSE
Sam James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 13 23:12:59 PDT 2023
thesamesam added a comment.
I can only reproduce it with a GCC-built LLVM.
Anyway, given `LLVM_COMPILER_IS_GCC_COMPATIBLE` is true for Clang (see `llvm/cmake/modules/DetermineGCCCompatible.cmake`), it seems easiest for us to just check `CMAKE_COMPILER_IS_GNUCXX` instead (given Clang doesn't acknowledge `-fno-lifetime-dse` at all).
I'll test that now.
================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:597-603
+if ( LLVM_COMPILER_IS_GCC_COMPATIBLE )
+ # LLVM data structures like llvm::User and llvm::MDNode rely on
+ # the value of object storage persisting beyond the lifetime of the
+ # object (#24952). This is not standard compliant and causes a runtime
+ # crash if LLVM is built with GCC and LTO enabled (#57740). Until
+ # these bugs are fixed, we need to disable dead store eliminations
+ # based on object lifetime.
----------------
bi
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150505/new/
https://reviews.llvm.org/D150505
More information about the llvm-commits
mailing list