[PATCH] D32471: IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 30 14:09:21 PDT 2017


mehdi_amini added inline comments.


================
Comment at: llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h:54
+  /// The GlobalValue corresponding to this summary. This is only used in
+  /// per-module summaries.
+  const GlobalValue *GV = nullptr;
----------------
I don't understand why/where this is needed/used, the comment does not seem enough here.
It seems to me that this make the in-memory CombinedIndex unnecessary larger.



================
Comment at: llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h:73
+/// Struct that holds a reference to a particular GUID in a global value
+/// summary.
+struct ValueInfo {
----------------
The doc here does not seem complete/accurate


================
Comment at: llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h:81
+  GlobalValue::GUID getGUID() const { return Ref->first; }
+  const GlobalValue *getValue() const { return Ref->second.GV; }
+  ArrayRef<std::unique_ptr<GlobalValueSummary>> getSummaryList() const {
----------------
There is no doc about when this is valid. 

I feel the invariant of the whole system are quite hard to grasp.


Repository:
  rL LLVM

https://reviews.llvm.org/D32471





More information about the llvm-commits mailing list