<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>I see, thanks Duncan. The problem was, I was not running the InstCombiner in the first place.<br><br>Best,<br>Gabriel<br><br><hr id="zwchr"><b>De: </b>"Duncan Sands" <baldrick@free.fr><br><b>Para: </b>llvmdev@cs.uiuc.edu<br><b>Enviados: </b>Martes, 29 de Marzo 2011 16:47:29<br><b>Asunto: </b>Re: [LLVMdev] Anomaly with CallGraph construction<br><br>Hi Gabriel,<br><br>...<br>> Summarizing, I have two questions: 1) is the CallGraph analysis "working as<br>> intended" here?; and 2) what would be the correct approach<br>> to modifying the proposed analysis in order to detect that randlc() is being<br>> called in that CallInst ?<br><br>the reason that the callgraph analysis does not try to understand indirect<br>calls like this is that other passes are supposed to sort such things out<br>if they can be sorted out.  If they failed then there is no point in having<br>the callgraph analysis try too.  The main place that tries to sort out such<br>bitcasts is transformConstExprCastCall in InstCombineCalls.cpp.  You may want<br>to rummage around in there to work out why it thinks removing the bitcast is<br>unsafe.<br><br>So the answers to your questions are: (1) yes, and (2) it is not a job for the<br>analysis - instcombine is the place to take care of this.<br><br>Ciao, Duncan.<br>_______________________________________________<br>LLVM Developers mailing list<br>LLVMdev@cs.uiuc.edu         http://llvm.cs.uiuc.edu<br>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<br></div></body></html>