[PATCH] D96931: [LTO] Discard non-prevailing defined symbols in module-level assembly
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 10 19:48:45 PST 2021
ychen added a comment.
@MaskRay Thanks for the suggestion.
I have an internal build config that needs this fix. I'm happy to take whatever approach that reviewers agree upon. To summarise the proposed solutions:
- (@pcc) Add assembly directive (`.newmodule` or just `.module`), handle the linking in the MC layer.
- Pros: a general solution that maybe useful in the future, no need to encoding information into IR).
- Cons: new assembly directive?
- (@MaskRay and my initial proposed alternative) discard non-prevailing symbols in MC.
- Pros: no new assembly directive
- Cons: through either IR or LLVM API, the symbol list and each symbol's position need to be passed to MC. Better than doing MCAsmParse in LTO phase but still feels like a lot of work for a specific problem.
I would take @pcc 's suggestion. @MaskRay thoughts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96931/new/
https://reviews.llvm.org/D96931
More information about the llvm-commits
mailing list