gccint: Adding a new GIMPLE statement code
1
1 12.11 Adding a new GIMPLE statement code
1 ========================================
1
1 The first step in adding a new GIMPLE statement code, is modifying the
1 file 'gimple.def', which contains all the GIMPLE codes. Then you must
1 add a corresponding gimple subclass located in 'gimple.h'. This in
1 turn, will require you to add a corresponding 'GTY' tag in
1 'gsstruct.def', and code to handle this tag in 'gss_for_code' which is
1 located in 'gimple.c'.
1
1 In order for the garbage collector to know the size of the structure
1 you created in 'gimple.h', you need to add a case to handle your new
1 GIMPLE statement in 'gimple_size' which is located in 'gimple.c'.
1
1 You will probably want to create a function to build the new gimple
1 statement in 'gimple.c'. The function should be called
1 'gimple_build_NEW-TUPLE-NAME', and should return the new tuple as a
1 pointer to the appropriate gimple subclass.
1
1 If your new statement requires accessors for any members or operands it
1 may have, put simple inline accessors in 'gimple.h' and any non-trivial
1 accessors in 'gimple.c' with a corresponding prototype in 'gimple.h'.
1
1 You should add the new statement subclass to the class hierarchy
1 diagram in 'gimple.texi'.
1