[PATCH] D139816: [LTO] Don't generate invalid modules if "LTOPostLink" MD already exists
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 08:05:59 PDT 2023
tejohnson added a comment.
>From the semantic meaning of this module flag as described in D63932 <https://reviews.llvm.org/D63932>, and from its usage, it seems it should not block IR from being sent through the LTO pipeline multiple times.
Adding a new interface works, but if you do that please add a test of it to llvm/unittests/IR/ModuleTest.cpp (see where the other setModuleFlag interface is tested there). The other alternative would be to simply guard the addModuleFlag with a check of getModuleFlag("LTOPostLink") returning null (and if non-null assert that the value is '1').
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