[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 10:20:32 PST 2022


JonChesterfield added inline comments.


================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:4934
     assert(Old->hasOneUse() &&
            "llvm.embedded.module can only be used once in llvm.compiler.used");
     GV->takeName(Old);
----------------
here's an assert that this function only handled one at a time


================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:4968
 
   // Recreate llvm.compiler.used.
   ArrayType *ATy = ArrayType::get(UsedElementType, UsedArray.size());
----------------
This is probably better written in terms of a call to a function like removeFromUsedList, which exists in AMDGPULowerModuleLDSPass at present because I forgot to move it and failed to find an existing implementation. Perhaps something that should be next to llvm::collectUsedGlobalVariables in Module.cpp?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116542



More information about the llvm-commits mailing list