[llvm-branch-commits] [llvm][fatlto] Drop any CFI related instrumentation after emitting bitcode (PR #112788)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Oct 17 16:40:36 PDT 2024
================
@@ -1629,6 +1629,10 @@ PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO,
MPM.addPass(buildLTOPreLinkDefaultPipeline(Level));
MPM.addPass(EmbedBitcodePass(ThinLTO, EmitSummary));
+ // If we're doing FatLTO w/ CFI enabled, we don't want the type tests in the
+ // object file.
+ MPM.addPass(LowerTypeTestsPass(nullptr, nullptr, true, true));
----------------
pcc wrote:
The assertion is to check that the code is only removing type test assumes (possibly involving a phi). So I wouldn't call the functionality that you're adding "always drop type tests". What you're adding is more like "drop type tests" and what's there already is "drop type test assumes". So maybe you can name the enumerators based on that.
https://github.com/llvm/llvm-project/pull/112788
More information about the llvm-branch-commits
mailing list