ack/mach/proto/mcg/basicblock.h
David Given 21034c0d65 No, dammit, for register allocation I need to walk the blocks in *dominance*
order. Since the dominance tree has changed when I fiddled with the graph, I
need to recompute it, so factor it out of the SSA pass. Code is uglier than I'd
like but at least the RET statement goes last in the generated code now.
2016-10-05 23:52:54 +02:00

30 lines
599 B
C

#ifndef BASICBLOCK_H
#define BASICBLOCK_H
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 */
ARRAYOF(struct vreg) liveins;
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 : */