Hello,

If local_function_and_variable_visibility was not a simple IPA pass it would not have been called once per file but once per function (as it is with GIMPLE pass). I feel this is normal that this pass is run 2 times because it is run before any link operations.

However, I don't know exactly how and when ld is called and which passes run after this.

Pierre Vittet

On 13/07/2011 17:54, AJM-2 wrote:

What you say is in line with my understanding, however when I instrument the
execute function of ipa-function-and-variable-visibility
(local_function_and_variable_visibility()) I note that:

gcc -flto a.c b.c
causes the pass to be called twice (presumably once per file).

If I split the compilation into two stages, then in the link stage
gcc -flto a.o b.o
the pass is never called.

Conversely, the gate of IPA-Points-to does seem to be called three times at
link time (presumably once for each file and then once for all together).  I
cannot discover the cause of the different behaviours here.

Reply via email to