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: [PATCH] Slightly optimize insn-attrtab.c


On Tue, 20 Jul 2004, Jakub Jelinek wrote:

> Hi!
> 
> This patch saves around 8kB in insn-attrtab.o .text section on x86-64.
> It changes insn-attrtab.c like:
> -      if (!((1 << which_alternative) & 0x3))
> +      if (which_alternative >= 2)
> 
> or
> -      if (((1 << which_alternative) & 0x7))
> +      if (which_alternative < 3)

Isn't this something GCC should optimize?  Presumably it could be of use
to more machine-generated code than just insn-attrtab.c.  At present this
sort of thing would go somewhere in fold().

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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