[tuples] Change width of subcode and remove gimple_subcode
Diego Novillo
dnovillo@google.com
Wed Jun 25 20:03:00 GMT 2008
The subcode field is sometimes used to hold tree codes, so it cannot
be 8 bits wide. OTOH, the main code field is way too wide. We only
have 30ish gimple codes, so I just changed code to be 8 bits and
subcode 16.
I also removed the generic gimple_subcode() call. This accessor was
too general, each tuple code needs its own one as they have slightly
different semantics. The only time when we want to access it in some
generic way is when dealing with GIMPLE_ASSIGN, GIMPLE_CALL or
GIMPLE_COND. Those 3 are the only tuples that "compute" something. I
added gimple_expr_code, and made gimple_expr_type to explicitly handle
those 3.
Since we don't have gimple_subcode anymore, several low-level
accessors in gimple.h need to make direct references to the subcode
field. I didn't find a convincing way of adding a private accessor
that only code in gimple.h could see. I guess I could've defined a
macro at the top of gimple.h and poison it at the end. Maybe in a
follow-up patch.
The patch is a bit big, but largely mechanic.
Bootstrapped and tested on x86_64.
Diego.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 20080625-fix-gimple-subcode.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080625/6bf836d7/attachment.txt>
More information about the Gcc-patches
mailing list