[PATCH] D33151: ThinLTO: Verify bitcode before lauching the ThinLTOCodeGenerator.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 17:19:09 PDT 2017


mehdi_amini added a comment.

(+ at pcc)
Someone should take care of making sure this is also handled by the new LTO API.



================
Comment at: lib/LTO/ThinLTOCodeGenerator.cpp:440
   bool SingleModule = (ModuleMap.size() == 1);
+  verifyMergedModule(TheModule);
 
----------------
The name seems misleading: the module hasn't been "merged" here (no importing happened at this point).


================
Comment at: lib/LTO/ThinLTOCodeGenerator.cpp:470
+  // Verify again to catch all cross-imports.
+  verifyMergedModule(TheModule);
   optimizeModule(TheModule, TM, OptLevel, Freestanding);
----------------
How costly is it to do it two times?
I guess there is not much choice any way with respect to debug info....

Do we have testing for this?


https://reviews.llvm.org/D33151





More information about the llvm-commits mailing list