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] |
| Other format: | [Raw text] | |
As we convert code to tuples, we find various bitflags that used to be stored in random fields inside the tree. In tuples, we have between 8 and 16 bits worth of space for various bit flags. Flags that are common to every statement go in the 8-bit field 'flags' in gimple_statement_base. That's not a lot of room, so only the most commonly used flags will end up there. For flags that are only useful in certain statements, we have a bit more freedom. If the statement does not use subcodes, then there are 8 additional bits for setting flags. This is the case of GIMPLE_ASM, the 'volatile' flag for GIMPLE_ASM can live in the subcode field. All this complication is not exposed to the user code, however. All these flags are get/set by inline functions in gimple.h. So, we can change where the flags live very easily. I can see some of these flags ending up implemented as pointer maps, hashtables or bitmaps. This patch re-organizes the few flags we have defined for now so that it's easier to add/remove flags as we go along. Tested on x86_64. Committed. Diego.
Attachment:
20071030-flags.diff.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |