Message ID | CABu31nNNGf3cpMiiF8EXuofob_cd2g26ndYuxaVqJS=5WTvw9Q@mail.gmail.com |
---|---|
State | New |
Headers | show |
> For scalar fields or skipped fields, gengtype produces empty loops. > This patch checks for that case and breaks out if an empty loop body > is detected: > Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK? > > Ciao! > Steven OK, thanks!
On Tue, Jul 24, 2012 at 11:31 AM, Laurynas Biveinis <laurynas.biveinis@gmail.com> wrote: >> For scalar fields or skipped fields, gengtype produces empty loops. > >> This patch checks for that case and breaks out if an empty loop body >> is detected: >> Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK? >> >> Ciao! >> Steven > > OK, thanks! I think it merely points to a bogus GTY annotation, not sure if we want to gobble this kind of gengtype hacks which only benefit -O0 ... The annotation is libcpp/include/line-map.h In the example above x1 (for token "+") is going to be the same as y1. x0 is the spelling location for the argument token "1", and x2 is the spelling location for the argument token "2". */ source_location * GTY((length ("2 * %h.n_tokens"))) macro_locations; Richard. > -- > Laurynas
On Tue, Jul 24, 2012 at 11:38 AM, Richard Guenther <richard.guenther@gmail.com> wrote: > I think it merely points to a bogus GTY annotation, not sure if we want to > gobble this kind of gengtype hacks which only benefit -O0 ... > > The annotation is libcpp/include/line-map.h > > In the example above x1 (for token "+") is going to be the same > as y1. x0 is the spelling location for the argument token "1", > and x2 is the spelling location for the argument token "2". */ > source_location * GTY((length ("2 * %h.n_tokens"))) macro_locations; Right. I'm testing a patch that removes the marker. Ciao! Steven
> I think it merely points to a bogus GTY annotation, not sure if we want to > gobble this kind of gengtype hacks which only benefit -O0 ... > > The annotation is libcpp/include/line-map.h > > In the example above x1 (for token "+") is going to be the same > as y1. x0 is the spelling location for the argument token "1", > and x2 is the spelling location for the argument token "2". */ > source_location * GTY((length ("2 * %h.n_tokens"))) macro_locations; This one indeed looks redundant, are there others? I am wondering if there is something that would produce an empty loop for GC but not for PCH or the other way around.
--- gtype-desc.c.orig 2012-07-24 01:57:42.830007515 -0700 +++ gtype-desc.c 2012-07-24 02:10:14.530007515 -0700 @@ -89,6 +89,7 @@ { size_t i0; for (i0 = 0; i0 != l0; i0++) { + break; } } }