[lto] function to DECL associations for WPA repackaging

Diego Novillo dnovillo@google.com
Thu Jun 12 20:40:00 GMT 2008


On 2008-06-12, Kenneth Zadeck <zadeck@naturalbridge.com> wrote:

>  I have no idea how to make sure, in whopr, that function x sees foobar if
> you are going to cherry pick the globals also.

I'm not sure I see the problem that you are pointing to.  In this program:

int N;
int foobar;
int *bar = &foobar;
int **foo = &bar;
x ()
{
  int **x = foo;
  return **x;
}

All of 'foobar', 'bar' and 'foo' will be in the list of symbols
referenced by x().  When time comes to emit those symbols,
gimple_referenced_vars(x) will have the set of globals that we are
looking for.  Global symbol N will not be in the list, and that's
fine.


Diego.



More information about the Gcc mailing list