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]

Re: cpplib: some size reductions



  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


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