This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Introduce MODE_SIZE mode attribute
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Richard Henderson <rth at redhat dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 Jan 2014 16:20:55 +0100
- Subject: Re: [PATCH] Introduce MODE_SIZE mode attribute
- Authentication-results: sourceware.org; auth=none
- References: <20140103084802 dot GV892 at tucnak dot redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1401031529090 dot 6742 at digraph dot polyomino dot org dot uk> <20140103233757 dot GR892 at tucnak dot redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sat, Jan 04, 2014 at 12:37:57AM +0100, Jakub Jelinek wrote:
> That is certainly doable (as attached), but strangely if the patch (that I've
> already committed) is reverted and this one applied, the .text savings are
> much smaller.
>
> Here are .text and .rodata readelf -WS lines from x86_64 (first 4 pairs) and
> i686 (last 4 pairs) builds, always vanilla trunk before r206312, that plus
> r206312 patch, without r206312 but with attached patch, with both r206312
> and attached patch. So, for .text size the best is both patches, but
> for .rodata patches just r206312. I'll try to look at details why this is so
> next week.
The difference is I think caused by the way gencondition.c works.
As the array with the conditions is a toplevel array, __builtin_constant_p
is folded there already during the parsing, after folding the conditions.
If I (manually for now) move the build/gencondmd.c insn_conditions array
instead of main and remove static const keywords, I get undefined references
when linking build/gencondmd, on x86_64 about the:
`default_target_flag_state'
`flag_unsafe_math_optimizations'
`insn'
`ix86_arch_features'
`ix86_fpmath'
`ix86_isa_flags'
`ix86_stack_protector_guard'
`operands'
`reload_completed'
`reload_in_progress'
`target_flags'
symbols.
Jakub