[PATCH] D139816: [LTO] Don't generate invalid modules if "LTOPostLink" MD already exists
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 26 11:28:58 PST 2023
arsenm added a comment.
In D139816#4083630 <https://reviews.llvm.org/D139816#4083630>, @steven_wu wrote:
> I am not the expert to answer that question. I will think this is an `assertion`-like behavior. It tells you as a compiler developer that your pipeline configuration is wrong in a sense that you should add all the functions in before running post link passes. You should delay the post link pass when you hit this error, rather than disable the check without a compelling reason.
>
> For example, the legacy LTO pipeline used to hit the same error, when you run `ld -r` (it is the linking option in ld64 that produces another object file for later usage), then link with other bitcode object in the final link. The fix is to not run post link pass during `ld -r` so it can be run in the end once.
I think this violates a core tenet of being a modular, reusable IR. It shouldn't be wrong to run a pass twice. It certainly shouldn't error by way of verifier error
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139816/new/
https://reviews.llvm.org/D139816
More information about the llvm-commits
mailing list