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-15 20:53:56 +00:00
|
|
|
int locals_size;
|
|
|
|
int spills_size;
|
|
|
|
int saved_size;
|
|
|
|
int fp_to_st;
|
|
|
|
int fp_to_ap;
|
|
|
|
int fp_to_lb;
|
2016-10-01 22:30:33 +00:00
|
|
|
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 : */
|