[LLVMdev] Two questions about MergeFunctions pass
Stepan Dyatkovskiy
stpworld at narod.ru
Sun Oct 27 11:30:54 PDT 2013
Hi Nick.
Can you help me sort some things out in MergeFucntions pass. While I was
working on MergeFunctions pass I got several questions. I hardly tried
to find all the answers by myself, but there are still two questions
without answer.
It is about merging functions itself (not comparing).
First question is:
Why sometimes we use RAUW and sometimes replaceDirectCallers. Would you
help me with explanation how "overridability" and possibility to create
aliases affects on our decision what to use RAUW or replaceDirectCallers?
And the second question.
There is a case when both "F" and "G" are overridable and target
supports global aliases. We replace "G" with alias to "F". Its ok. But
why we also replace "F" with alias to "F"? Suppose, for keeping callers
equal when it is possible. Though aren't callers equal if caller "A"
calls "F", and caller "B" calls "alias-to-F"? Perhaps there are more
reasons?
Thanks you very much!
-Stepan
More information about the llvm-dev
mailing list