[PATCH] D39356: [ThinLTO] Fix missing call graph edges for calls with bitcasts.
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 6 13:50:18 PST 2017
tejohnson added a comment.
In https://reviews.llvm.org/D39356#917074, @efriedma wrote:
> > The issue here is that we detected that this GV was a Callee, so we didn't add a reference edge.
>
> Are you sure that's what's happening? The isCallee test is an exact equality comparison, so it should fail if we're calling a bitcasted global.
Hmm, I think that is a good question, looking at the code again. @vsapsai, can you see why the reference wasn't recorded in findRefEdges?
>
>
>> The crucial part is distinction between int ext(); and int ext(void);.
>
> Yes, this is exactly right.
Got it, thanks.
================
Comment at: llvm/lib/Analysis/ModuleSummaryAnalysis.cpp:283
continue;
- // Skip direct calls.
- if (!CS.getCalledValue() || isa<Constant>(CS.getCalledValue()))
- continue;
+ assert(CalledValue && !isa<Constant>(CalledValue) &&
+ "Expected indirect call");
----------------
I'm a little worried that we may have a case with CalledValue==null (presumably it wasn't an accident that we were checking for a null CalledValue before). Anyone know if that is valid?
https://reviews.llvm.org/D39356
More information about the llvm-commits
mailing list