[LLVMdev] Anomaly with CallGraph construction

Gabriel Rodríguez grodriguez at udc.es
Tue Mar 29 09:07:11 PDT 2011


I see, thanks Duncan. The problem was, I was not running the InstCombiner in the first place. 

Best, 
Gabriel 


De: "Duncan Sands" <baldrick at free.fr> 
Para: llvmdev at cs.uiuc.edu 
Enviados: Martes, 29 de Marzo 2011 16:47:29 
Asunto: Re: [LLVMdev] Anomaly with CallGraph construction 

Hi Gabriel, 

... 
> Summarizing, I have two questions: 1) is the CallGraph analysis "working as 
> intended" here?; and 2) what would be the correct approach 
> to modifying the proposed analysis in order to detect that randlc() is being 
> called in that CallInst ? 

the reason that the callgraph analysis does not try to understand indirect 
calls like this is that other passes are supposed to sort such things out 
if they can be sorted out. If they failed then there is no point in having 
the callgraph analysis try too. The main place that tries to sort out such 
bitcasts is transformConstExprCastCall in InstCombineCalls.cpp. You may want 
to rummage around in there to work out why it thinks removing the bitcast is 
unsafe. 

So the answers to your questions are: (1) yes, and (2) it is not a job for the 
analysis - instcombine is the place to take care of this. 

Ciao, Duncan. 
_______________________________________________ 
LLVM Developers mailing list 
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu 
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110329/1bf96d49/attachment.html>


More information about the llvm-dev mailing list