130 int (*callback)(
t_bbNode *node,
int nodeIndex,
void *context));
t_listNode * pred
List of predecessors to this basic block.
t_regID tempRegID
Register identifier.
t_listNode * registers
List of all temporary registers used in the program.
t_listNode * mcRegWhitelist
Physical register whitelist. Used by the register allocator.
t_listNode * in
Set of registers live at the entry of the node ('in' set).
t_listNode * nodes
List of instructions in the block.
t_cfg * parent
The containing basic block.
t_basicBlock * parent
Pointer to the containing basic block.
t_listNode * out
Set of registers live at the exit of the node ('out' set).
t_listNode * succ
List of successors to this basic block.
t_instruction * instr
Pointer to the instruction associated with this node.
t_listNode * blocks
List of all the basic blocks, in program order.
t_basicBlock * endingBlock
t_cfgReg * defs[CFG_MAX_DEFS]
Set of registers defined by this node ('def' set). NULL slots are ignored.
t_cfgReg * uses[CFG_MAX_USES]
Set of registers used by this node ('use' set). NULL slots are ignored.
void cfgToProgram(t_program *program, t_cfg *graph)
void cfgComputeLiveness(t_cfg *graph)
void deleteCFG(t_cfg *graph)
t_listNode * bbGetLiveOut(t_basicBlock *bblock)
int cfgIterateNodes(t_cfg *graph, void *context, int(*callback)(t_bbNode *node, int nodeIndex, void *context))
#define CFG_MAX_USES
Maximum number of temporary register uses for each node.
t_bbNode * bbInsertInstruction(t_basicBlock *block, t_instruction *instr)
#define CFG_MAX_DEFS
Maximum number of temporary register definitions for each node.
t_bbNode * bbInsertInstructionBefore(t_basicBlock *block, t_instruction *instr, t_bbNode *ip)
void cfgDump(t_cfg *graph, FILE *fout, bool verbose)
t_listNode * bbGetLiveIn(t_basicBlock *bblock)
t_cfg * programToCFG(t_program *program)
t_bbNode * bbInsertInstructionAfter(t_basicBlock *block, t_instruction *instr, t_bbNode *ip)
int t_regID
Type for register identifiers.
Program object definition and management.