ACSE 2.0.3
Advanced Compiler System for Education
Loading...
Searching...
No Matches
cfg.h File Reference

Control Flow Graph generation and related analyses. More...

#include <stdio.h>
#include <stdbool.h>
#include "program.h"
#include "list.h"

Go to the source code of this file.

Data Structures

struct  t_cfgReg
struct  t_bbNode
struct  t_basicBlock
struct  t_cfg

Macros

#define CFG_MAX_DEFS   1
 Maximum number of temporary register definitions for each node.
#define CFG_MAX_USES   2
 Maximum number of temporary register uses for each node.

Functions

Basic Blocks
t_bbNodebbInsertInstruction (t_basicBlock *block, t_instruction *instr)
t_bbNodebbInsertInstructionBefore (t_basicBlock *block, t_instruction *instr, t_bbNode *ip)
t_bbNodebbInsertInstructionAfter (t_basicBlock *block, t_instruction *instr, t_bbNode *ip)
Control Flow Graph construction
t_cfgprogramToCFG (t_program *program)
int cfgIterateNodes (t_cfg *graph, void *context, int(*callback)(t_bbNode *node, int nodeIndex, void *context))
void cfgToProgram (t_program *program, t_cfg *graph)
void deleteCFG (t_cfg *graph)
Data Flow Analysis
void cfgComputeLiveness (t_cfg *graph)
t_listNodebbGetLiveIn (t_basicBlock *bblock)
t_listNodebbGetLiveOut (t_basicBlock *bblock)
Utilities
void cfgDump (t_cfg *graph, FILE *fout, bool verbose)

Detailed Description

Control Flow Graph generation and related analyses.

Definition in file cfg.h.