This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: switch index optimization
On Sun, Jan 25, 1998 at 11:01:48PM -0800, Joe Buck wrote:
> Not a bad idea, but kind of an unclean implementation.
Guilty.
> But to do really well, range propagation needs to be done with dataflow
> analysis (though in this case you can do it without).
Thus my comment about maybe doing it in jump. It does some of
that sort of thing, and I am half-remembering Jeff doing some
work recently in that area for <censored>, such that
if (x < 7) {
if (x == 9) { }
}
and similar get optimized properly.
Ah well, perhaps I'll clean up what I was doing, and if someone does
do the Right Thing elsewhere later, we can strip mine back out.
r~