This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: some size reductions
- To: Zack Weinberg <zack at bitmover dot com>
- Subject: Re: cpplib: some size reductions
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 29 Oct 1999 00:37:45 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <199910290459.VAA15169@zack.bitmover.com>you write:
> > > might be usefully optimized to a binary search or even a jump table.
> > > Is this feasible with the current global optimizer framework?
> > The decision to use a series of if-else statements or a case/switch happe
> ns
> > during the tree->rtl conversion. By the time the global optimizer gets
> > involved the decision was already made.
>
> Yah, but couldn't the global optimizer transform the RTL for a series
> of if-elses testing equality into a binary search?
In theory yes, but given the current structure of both the jump optimizer
and the global optimizers I suspect it would be fairly difficult (or maybe
that's because I haven't thought hard about the problem).
There may be algorithms to do this kind of thing. Maybe a control dependence
tree would help. I really don't know.
jeff