This is the mail archive of the gcc-patches@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: Fold acc_on_device


On 09/30/2015 08:46 AM, Richard Biener wrote:
On Wed, Sep 30, 2015 at 2:18 PM, Nathan Sidwell <nathan@acm.org> wrote:

Please don't add any new GENERIC based builtin folders.  Instead add to
gimple-fold.c:gimple_fold_builtin

Otherwise you're just generating more work for us who move foldings from
builtins.c to gimple-fold.c.

Oh, sorry, I didn't know about that.  Will fix.

Should I use the same
  if (symtab->state == EXPANSION)
test to make sure we're after LTO read back (i.e. know which compiler we're
in), or is there another way?
I don't know of a better way, no.  I'll add a comment to builtins.c
(not that I expect anyone sees it ;))



btw, not that it's necessarily important, but I'm about to submit the include reduction patches today, and it turns out this line is the first use of anything from cgraph.h in builtins.c.

So if this is "the way" of doing the test, be aware it adds a dependency on cgraph.h that wasn't there before.

I noticed because the reducer finished on a 9/28 branch . When I re-applied the patch to a 9/30 branch, builtins.c failed to compile because it wasn't including cgraph.h for 'symtab' and 'EXPANSION'. So it wasn't required in 9/28.

Going forward, it will be obvious when we are adding a new dependency because the file will fail to compile without adding the requisite header file.

Andrew





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