Function aliases in CallGraph

Hello, I have a simple program using aliases to functions, and it seems that the CallGraph doesn’t follow these aliases. Here is the example:

@alias = alias void ()* @realfunc

define void @realfunc() {
entry:
ret void
}

define i32 @main() {
entry:
call void @alias()
ret i32 0
}

******* Output of the CallGraph *******

Call graph node <><<0xbe64c0>> #uses=0
CS<0x0> calls function ‘realfunc’
CS<0x0> calls function ‘realfunc’
CS<0x0> calls function ‘main’

Call graph node for function: ‘realfunc’<<0xbe6880>> #uses=2

Call graph node for function: ‘main’<<0xbe6d80>> #uses=1
CS<0xbdfe7c> calls external node

Is there a reason the CallGraph doesn’t try to see through aliases? I would like this capability, but was wondering if it is generally safe to do.

Thanks,
-Stephen

CallGraph is designed to be as simple as possible. GlobalOpt will
perform the optimization in question.

-Eli

That works perfect, thanks!

-Stephen