[llvm-commits] [pr12351] Handle intrinsics in GlobalsModRef

Duncan Sands baldrick at free.fr
Wed Mar 28 00:46:11 PDT 2012


Hi Rafael,

> Intrinsic calls don't show up as part of the normal callgraph walk
> that GlobalsModRef does. This patch makes it handle them in the same
> place it handles explicit loads and stores by asking the basic alias
> analysis what it knows about that intrinsic.
>
> Is it OK? Why are intrinsics excluded from the normal callgraph walk?

I guess the idea is that intrinsics aren't functions being called, they
represent code that is inlined in place, and thus are more analogous to
an exotic instruction than to a real function call.  If they were in the
callgraph then any function using an intrinsic would get an edge to the
"external node" in the callgraph.  This would cause FunctionAttrs to bail
out and not mark the function readonly/readnone for example (IIRC).

Ciao, Duncan.



More information about the llvm-commits mailing list