[PATCH] D34063: [ThinLTO][llvm-lto2] Dump YAML for module summaries

Charles Saternos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 13:06:52 PDT 2017


ncharlie added inline comments.


================
Comment at: include/llvm/IR/ModuleSummaryIndexYAML.h:247
+    io.mapOptional("Kind", summary.Kind);
+    io.mapOptional("Linkage", summary.Linkage);
+    io.mapOptional("NotEligibleToImport", summary.NotEligibleToImport);
----------------
Some of these traits are duplicated. I could create a second struct called SharedSummaryYaml or something to deduplicate these fields, if anyone thinks they're worth centralizing. 


================
Comment at: include/llvm/IR/ModuleSummaryIndexYAML.h:278
+struct NGVMValue {
+  ModuleSummaryIndex *Index;
+  GlobalValue::GUID GUID;
----------------
I couldn't figure out how to thread a pointer to the Index down to the code that needs it (i.e. structs that are nested deeper in and have their own MappingTraits), so I left it here for now. If anyone has recommendations for a better place to put this, please let me know.


https://reviews.llvm.org/D34063





More information about the llvm-commits mailing list