[PATCH] D25384: [ThinLTO] Record references to aliases to calls

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 17:28:35 PDT 2016


mehdi_amini added inline comments.


================
Comment at: lib/Analysis/ModuleSummaryAnalysis.cpp:58
         // specially by WriteFunction and are added to a separate list.
-        if (!(CS && CS.isCallee(&OI)))
+        if (!(CS && CS.isCallee(&OI) && CS.getCalledFunction()))
           RefEdges.insert(Operand);
----------------
tejohnson wrote:
> mehdi_amini wrote:
> > I don't understand this change. I seem to me that you're adding a reference when we're calling an alias. Why isn't the alias added as a callee?
> Because there is no called function (it's null). Note we can still find the aliasee function in the ref graph via the alias summary. Maybe we should add a call edge to the alias regardless, so we could import via the alias summary...let me try that . 
I have a doubt about what we generate (and should generate) on you example, is it:

- main reference analias
- main calls aliasee
- analias reference aliasee

Or:

- main calls analias
- analias reference aliasee

I tend to lean for the second one.


https://reviews.llvm.org/D25384





More information about the llvm-commits mailing list