ctrump/analyzer/cfg.h File Reference

CFGの定義. More...

#include "ctrump/common/mempool.h"
#include "ctrump/common/bitmap.h"
#include "ctrump/common/intmap.h"
#include "ctrump/analyzer/var.h"
#include "ctrump/ast/location.h"

Include dependency graph for cfg.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ctrump_cfg_var_info
 解析で使う変数の情報 More...
struct  ctrump_bb
 basic block(基本ブロック) More...
struct  ctrump_cfg
 CFG(Control Flow Graph) 現在のCTRUMPでは関数ひとつにCFGがひとつできる. More...
struct  ctrump_build_cfg_error
 build cfg error More...

Defines

#define CTRUMP_BB_LOOP_ENTRY   (1<<0)
#define CTRUMP_BB_IS_LOOP_ENTRY(b)   ((b)->flags & CTRUMP_BB_LOOP_ENTRY)

Enumerations

enum  ctrump_build_cfg_error_code {
  CTRUMP_BUILD_CFG_ERROR_UNDEFINED_LABEL, CTRUMP_BUILD_CFG_ERROR_REDEFINE_LABEL, CTRUMP_BUILD_CFG_ERROR_CONTINUE_IN_NOT_LOOP, CTRUMP_BUILD_CFG_ERROR_BREAK_IN_NOT_LOOP,
  CTRUMP_BUILD_CFG_ERROR_INVALID_LVALUE, CTRUMP_BUILD_CFG_ERROR_INVALID_ADDRESSOP
}
 build cfg エラーの種類 More...

Functions

int ctrump_build_cfg (struct ctrump_cfg *ret, struct ctrump_intmap *var_info_map, struct ctrump_build_cfg_error *error, const struct ctrump_fundef *def, struct ctrump_mempool *cfg_pool, struct ctrump_mempool *varmap_pool, int num_ast, int id_begin)
 CFGを作る.


Detailed Description

CFGの定義.

Definition in file cfg.h.


Define Documentation

#define CTRUMP_BB_IS_LOOP_ENTRY (  )     ((b)->flags & CTRUMP_BB_LOOP_ENTRY)

Definition at line 94 of file cfg.h.

Referenced by build_bfs_order().

#define CTRUMP_BB_LOOP_ENTRY   (1<<0)

Definition at line 66 of file cfg.h.

Referenced by build_cfg_loop().


Enumeration Type Documentation

build cfg エラーの種類

Note:
これらのエラーはパーサでチェックしているはずなので、 build_cfgかもしくはパーサにバグが無いかぎりエラーは出ない
Enumerator:
CTRUMP_BUILD_CFG_ERROR_UNDEFINED_LABEL  未定義のラベルがある
CTRUMP_BUILD_CFG_ERROR_REDEFINE_LABEL  ラベルを再定義した
CTRUMP_BUILD_CFG_ERROR_CONTINUE_IN_NOT_LOOP  ループの外でcontinueした
CTRUMP_BUILD_CFG_ERROR_BREAK_IN_NOT_LOOP  ループ、switchの外でbreakした
CTRUMP_BUILD_CFG_ERROR_INVALID_LVALUE  左辺値としておかしい
CTRUMP_BUILD_CFG_ERROR_INVALID_ADDRESSOP  アドレスが取れない式に'&'を適用した

Definition at line 124 of file cfg.h.


Function Documentation

int ctrump_build_cfg ( struct ctrump_cfg ret,
struct ctrump_intmap var_info_map,
struct ctrump_build_cfg_error error,
const struct ctrump_fundef def,
struct ctrump_mempool cfg_pool,
struct ctrump_mempool varmap_pool,
int  num_ast,
int  id_begin 
)


Generated on Tue Mar 31 20:19:24 2009 for ctrump by  doxygen 1.5.6