[Openmp-commits] [PATCH] D117211: [openmp] Mark used variables as retain as well

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 13 13:53:49 PST 2022

JonChesterfield added a comment.

The section discard behaviour is opt-in though, so any program that wrote 'used' to retain the variable and then used gc-sections, discovered it didn't work, and worked around that. Probably by compromising on gc.

So we aren't going from a state of broken to better, we're going from a system that worked reliably for years (provided the linker wasn't told to deadstrip sections and the compiler wasn't told to put the global in it's own section) to one that silently discards symbols.

If the idea is llvm.used and llvm.compiler.used shall now have the same semantics, we can kill a long tail of bugs by deleting one of them.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list