[PATCH] D109869: [LTO] An option to disable automatic bitcode upgrade

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 10:56:06 PST 2022


wenlei added inline comments.


================
Comment at: llvm/lib/Object/IRSymtab.cpp:427
   // a new symbol table from scratch.
-  if (FC.TheReader.getNumModules() != BFC.Mods.size())
-    return upgrade(std::move(BFC.Mods));
+  if (!DisableBitcodeUpgrade)
+    if (FC.TheReader.getNumModules() != BFC.Mods.size())
----------------
Upgrade for this case is probably always needed to recreate symbol table. I think that bypassing upgrade from benign version mismatch is all we need. Correspondingly, we could rename the switch as `diisable-bitcode-version-upgrade`. WDYT?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109869/new/

https://reviews.llvm.org/D109869



More information about the llvm-commits mailing list