ack/mach/proto/mcg/basicblock.h

44 lines
1 KiB
C
Raw Permalink Normal View History

#ifndef BASICBLOCK_H
#define BASICBLOCK_H
struct phi
{
struct basicblock* prev; /* Predecessor that this phi is referring to */
struct ir* ir; /* IR of variable definition */
};
struct basicblock
{
const char* name;
ARRAYOF(struct em) ems;
ARRAYOF(struct ir) irs;
ARRAYOF(struct hop) hops;
ARRAYOF(struct basicblock) prevs;
ARRAYOF(struct basicblock) nexts;
int order; /* used by dominance graph code */
PMAPOF(struct vreg, struct phi) phis;
/* Used by liveness calculation. */
ARRAYOF(struct vreg) liveins;
ARRAYOF(struct vreg) liveouts;
/* Register assignments on entry and exit. */
register_assignment_t regsin;
register_assignment_t* regsout; /* points at regsout of the last insn. */
2016-10-08 21:32:54 +00:00
bool is_fake : 1;
bool is_root : 1;
bool is_terminated : 1;
};
extern void bb_init(void);
extern struct basicblock* bb_get(const char* name);
extern void bb_alias(struct basicblock* block, const char* name);
#endif
/* vim: set sw=4 ts=4 expandtab : */