The following node structure is used to identify Code attributes at the backend of the LSS compiler. #001 #002 // node annotation extension, mainly used for code generation. #003 // #004 // Cai junsheng 2007/07/21 QQ: 9073204 #005 // #006 typedef struct {#007 unsigned listed: 1; // mark this as the root node of the tree. #008 unsigned registered: 1; // whether the register is allocated #009 unsigned emitted: 1; // identifies the output command. #010 unsigned copy: 1; // indicates the replication between registers. #011 unsigned equatable: 1; // The command that marks the temporary Unit for storing the public expression #012 unsigned spills: 1; // The register overflow flag. #013 unsigned mayrecalc: 1; // The node where the public expression can be recalculated. #014 void * State; // Save the command selection result. #015 short inst; // indicates whether the node is implemented using commands. #016 node kids [3]; // command tree compiled by the backend. #017 node Prev, next; // Command linked list. #018 node prevuse; #019 short argno; // number of parameters. #020} xnode; #021 #022 #023 typedef struct {#024 char * Name; // name generated by the compiler backend. #025 unsigned int eaddr;/* omit */#026 int offset; // indicates the stack location of the variable. #027 node lastuse; // The node that finally uses the register. #028 int usecount; // number of nodes used. #029 regnode; // storage allocation attributes. #030 symbol * wildcard; // Save the register list. #031} xsymbol; #032 back-end Generation Code. It is mainly used to calculate the attributes of the above structure. As long as all the above structures are filled in, the final code can be generated.