This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lto] function to DECL associations for WPA repackaging


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]