[llvm-branch-commits] [compiler-rt] [llvm] [ThinLTO][TypeProf] Implement vtable def import (PR #79381)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 25 15:21:35 PST 2024


================
@@ -199,14 +199,23 @@ class ModuleBitcodeWriterBase : public BitcodeWriterBase {
     for (const auto &GUIDSummaryLists : *Index)
       // Examine all summaries for this GUID.
       for (auto &Summary : GUIDSummaryLists.second.SummaryList)
-        if (auto FS = dyn_cast<FunctionSummary>(Summary.get()))
+        if (auto FS = dyn_cast<FunctionSummary>(Summary.get())) {
           // For each call in the function summary, see if the call
           // is to a GUID (which means it is for an indirect call,
           // otherwise we would have a Value for it). If so, synthesize
           // a value id.
           for (auto &CallEdge : FS->calls())
             if (!CallEdge.first.haveGVs() || !CallEdge.first.getValue())
               assignValueId(CallEdge.first.getGUID());
+
+          // For each referenced variables in the function summary, see if the
+          // variable is represented by a GUID (as opposed to a symbol to
+          // declarations or definitions in the module). If so, sythesize a
----------------
modiking wrote:

```suggestion
          // declarations or definitions in the module). If so, synthesize a
```

https://github.com/llvm/llvm-project/pull/79381


More information about the llvm-branch-commits mailing list