Getting rid of GET_RTX_CLASS?
Paolo Bonzini
paolo.bonzini@polimi.it
Tue Feb 3 23:16:00 GMT 2004
> >> I'd like to turn rtx classes from characters to enums. Would this be
> >> feasible? Interesting? It may result in slight compile time speedups,
> >> also.
>
> Compact switch tables, presumably.
Yes; lookup tables instead of binary searching. I also hope to learn something
while reading the code -- low priority things are good for beginners (like me).
I'd also like to introduce new predicates (like OBJECT_P I already have a patch
for) that express conditions like
GET_RTX_CLASS (x) == '2'
|| GET_RTX_CLASS (x) == '<'
|| GET_RTX_CLASS (x) == 'c'
that abound in cse and other places that may be put under a diet after tree-ssa
is merged. These could become GET_RTX_CLASS (x) >= BINARY && GET_RTX_CLASS (x)
<= BINARY_COMMUTATIVE (cheaper) as long as this is found only once, in rtl.h.
I suspect that an inordinate amount of time is spent in rtl.h if my very simple
OBJECT_P patch had a 1% gain on bootstrap time.
Paolo
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
More information about the Gcc
mailing list