On Wed, Mar 16, 2022 at 1:28 PM Roger Sayle <ro...@nextmovesoftware.com> wrote: > > > This patch is the first of two changes to genmatch that don't affect > the executable code, but reduce the amount of debugging information > generated in stage3 of a build, but adhering more closely to GNU style > guidelines. > > This patch avoids generating a switch with a single case statement, > instead preferring to use an "if (TREE_CODE (...) == SSA_NAME)" idiom. > These should compile to the same instructions, but the switch requires > more lines, especially when a debugger may set a break point on the > switch, the case, or the (obligatory) final "default:;". This reduces > the size of gimple-match.o by 53K on x86_64-pc-linux-gnu. > > This patch has been tested on x86_64-pc-linux-gnu with make bootstrap > and make -k check with no new failures. Ok for mainline?
Hmm, this makes the complicated code emission in gen_kids_1 even more complicated for a questionable gain which I'd rather not do, debuginfo savings or not ... Richard. > > 2022-03-16 Roger Sayle <ro...@nextmovesoftware.com> > > gcc/ChangeLog > * gcc/genmatch.cc (dt_node::gen_kids_1): Introduce use_switch > logic that prefers to generate an if statement rather than a > switch containing a single case (and a default). > > > Thanks in advance, > Roger > -- >