Cthulhu  0.2.10
Cthulhu compiler collection
ssa.c File Reference
#include "common/common.h"
#include "cthulhu/tree/query.h"
#include "arena/arena.h"
#include "std/str.h"
#include "std/map.h"
#include "std/set.h"
#include "std/vector.h"
#include "std/typed/vector.h"
#include "base/panic.h"
#include <stdio.h>
#include "cthulhu/ssa/ssa.inc"
Include dependency graph for ssa.c:

Go to the source code of this file.

Data Structures

struct  ssa_compile_t
 the ssa compilation context More...
 
struct  ssa_loop_t
 loop jump context More...
 
struct  ssa_map_sizes_t
 a prediction of how many items will be in each map this is not a hard limit, but a hint to the allocator More...
 

Macros

#define SSA_KIND(ID, NAME)   [ID] = (NAME),
 
#define SSA_OPERAND(ID, NAME)   [ID] = (NAME),
 
#define SSA_OPCODE(ID, NAME)   [ID] = (NAME),
 
#define SSA_VALUE(ID, NAME)   [ID] = (NAME),
 

Functions

void count_modules (ssa_map_sizes_t *sizes, const tree_t *tree)
 
ssa_map_sizes_t predict_maps (vector_t *mods)
 
STA_DECL ssa_result_t ssa_compile (vector_t *mods, arena_t *arena)
 compile a set of trees into their ssa form More...
 
STA_DECL const char * ssa_type_name (ssa_kind_t kind)
 
STA_DECL const char * ssa_opkind_name (ssa_opkind_t kind)
 
STA_DECL const char * ssa_opcode_name (ssa_opcode_t opcode)
 
STA_DECL const char * ssa_value_name (ssa_value_state_t value)
 

Macro Definition Documentation

◆ SSA_KIND

#define SSA_KIND (   ID,
  NAME 
)    [ID] = (NAME),

◆ SSA_OPCODE

#define SSA_OPCODE (   ID,
  NAME 
)    [ID] = (NAME),

◆ SSA_OPERAND

#define SSA_OPERAND (   ID,
  NAME 
)    [ID] = (NAME),

◆ SSA_VALUE

#define SSA_VALUE (   ID,
  NAME 
)    [ID] = (NAME),

Function Documentation

◆ count_modules()

void count_modules ( ssa_map_sizes_t sizes,
const tree_t tree 
)

Definition at line 866 of file ssa.c.

◆ predict_maps()

ssa_map_sizes_t predict_maps ( vector_t mods)

Definition at line 885 of file ssa.c.

◆ ssa_opcode_name()

STA_DECL const char* ssa_opcode_name ( ssa_opcode_t  opcode)

Definition at line 1059 of file ssa.c.

◆ ssa_opkind_name()

STA_DECL const char* ssa_opkind_name ( ssa_opkind_t  kind)

Definition at line 1051 of file ssa.c.

◆ ssa_type_name()

STA_DECL const char* ssa_type_name ( ssa_kind_t  kind)

Definition at line 1043 of file ssa.c.

◆ ssa_value_name()

STA_DECL const char* ssa_value_name ( ssa_value_state_t  value)

Definition at line 1067 of file ssa.c.