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

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 11:28:42 PST 2022


hoy 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())
----------------
wenlei wrote:
> 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?
Good point. Symbol table mismatch isn't what we are targeting. 


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