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;
|
|
|
|
struct basicblock* root_bb;
|
|
|
|
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 : */
|