[PATCH] D20217: Represent runtime preemption in the IR.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 15:40:58 PDT 2017


pcc added a comment.

Two states makes sense to me as well. From a bitcode upgrade perspective I think it would be valid to upgrade the current meaning of `dso_preemptable` to mean "always use the GOT" once that is implemented.



================
Comment at: lib/AsmParser/LLParser.cpp:1639
+  if (DSOLocal && DLLStorageClass == GlobalValue::DLLImportStorageClass) {
+    return Error(Lex.getLoc(), "dso_location and DLL-StorageClass mismatch");
+  }
----------------
Should this also be a verifier check?


================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:3057
   ValueList.push_back(NewGA);
+  if (OpNum != Record.size())
+    NewGA->setDSOLocal(getDecodedDSOLocal(Record[OpNum++]));
----------------
Nit: new code should probably go between lines 3055 and 3056.


================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:1200
     //             unnamed_addr, externally_initialized, dllstorageclass,
-    //             comdat, attributes]
+    //             comdat, attributes, DSO_Local]
     Vals.push_back(addToStrtab(GV.getName()));
----------------
Please update `docs/BitCodeFormat.rst`.


Repository:
  rL LLVM

https://reviews.llvm.org/D20217





More information about the llvm-commits mailing list