[llvm] [ThinLTO] Don't mark calloc function dead (PR #72673)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 14:00:01 PST 2023
================
@@ -54,6 +54,10 @@ static const char *PreservedSymbols[] = {
// TODO: Are there similar such variables?
"__ssp_canary_word",
"__stack_chk_guard",
+ // The dead store elimination pass can fold malloc + memset calls into
+ // a single call to calloc. Prevent thin LTO from marking calloc a dead
----------------
MaskRay wrote:
// Prevent thin LTO from marking calloc a dead function ...
I think this sentence can be removed, as it describes the problem that applies too all preserved symbols, which can use a comment applying to the whole variable.
This change affects regular LTO, so "thin LTO" is not accurate. This list also prevents internalization.
https://github.com/llvm/llvm-project/pull/72673
More information about the llvm-commits
mailing list