2016-10-01 22:30:33 +00:00
|
|
|
#ifndef PROCEDURE_H
|
|
|
|
#define PROCEDURE_H
|
|
|
|
|
|
|
|
struct local
|
|
|
|
{
|
2016-10-02 14:08:46 +00:00
|
|
|
int size;
|
|
|
|
int offset;
|
2016-10-01 22:30:33 +00:00
|
|
|
bool is_register;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct procedure
|
|
|
|
{
|
|
|
|
const char* name;
|
2016-10-15 16:38:46 +00:00
|
|
|
struct basicblock* entry;
|
|
|
|
struct basicblock* exit;
|
2016-10-01 22:30:33 +00:00
|
|
|
size_t nlocals;
|
|
|
|
ARRAYOF(struct basicblock) blocks;
|
|
|
|
IMAPOF(struct local) locals;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern void procedure_compile(struct procedure* proc);
|
2016-10-02 14:08:46 +00:00
|
|
|
extern void procedure_update_bb_graph(struct procedure* proc);
|
2016-10-01 22:30:33 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* vim: set sw=4 ts=4 expandtab : */
|