[PATCH] D97971: [IPSCCP] don't propagate constant in section when caller/callee sections mismatch
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 14:26:21 PST 2021
MaskRay added a comment.
> `void callee (int* x) { int y = *z; }`
Should it be `void callee (int* x) { int y = z; }` ?
> Later, Dead Argument Elimination (deadargelim) may even change the signature of callee removing dead arguments from its signature
Assuming `void callee` does not have the `static` keyword. deadargelim applies on local linkage functions.
LTO may internalize functions if the linker knows `callee` does not need to be exported. Yes, deadargelim can happen in that case.
https://github.com/ClangBuiltLinux/linux/issues/1301
> `WARNING: modpost: vmlinux.o(.text+0x68943): Section mismatch in reference from the function __nodes_weight() to the variable .init.data:numa_nodes_parsed`
If the warning about a non-`.init.text` function accesses `.init.data` data?
This feels to me that the kernel is asking too much.
If we rename `.init.text` to `.text.hot.` and `.init.data` to `.data.hot.`, this rule would mean that a regular `.text` function cannot access `.data.hot.` data.
This does not sound right to me.
If the kernel wants to have an optimization barrier on the arguments, it should properly use some attributes if it does not want to use `alwaysinline`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97971/new/
https://reviews.llvm.org/D97971
More information about the llvm-commits
mailing list