3 * Copyright (C) 2003-2008, The Perl Foundation.
6 #ifndef PARROT_IMCC_UNIT_H_GUARD
7 #define PARROT_IMCC_UNIT_H_GUARD
9 /* A IMC compilation unit or atomic metadata item.
10 * The unit holds the instruction list as well as
11 * all of the compiler state info, (reg allocator, cfg, etc.)
12 * for the unit of instructions.
22 * Optimization statistics -- we track the number of times each of these
23 * optimizations is performed.
35 typedef struct _IMC_Unit
{
37 Instruction
*instructions
;
38 Instruction
*last_ins
;
41 unsigned int n_basic_blocks
;
42 Basic_block
**bb_list
;
45 Set
**dominance_frontiers
;
47 Loop_info
**loop_info
;
50 /* register allocation */
51 unsigned int *interference_graph
;
55 struct _IMC_Unit
*prev
;
56 struct _IMC_Unit
*next
;
61 int n_vars_used
[4]; /* INSP in PIR */
62 int n_regs_used
[4]; /* INSP in PBC */
63 int first_avail
[4]; /* INSP */
65 PMC
*sub_pmc
; /* this sub */
66 int is_vtable_method
; /* 1 if a v-table method */
67 char *vtable_name
; /* v-table method name, if any */
68 char *instance_of
; /* PMC or class this is an instance of
70 SymReg
*lexid
; /* Unique lexical scope id */
72 struct imcc_ostat ostat
;
76 /* HEADERIZER BEGIN: compilers/imcc/unit.c */
77 /* HEADERIZER END: compilers/imcc/unit.c */
79 #endif /* PARROT_IMCC_UNIT_H_GUARD */
84 * c-file-style: "parrot"
86 * vim: expandtab shiftwidth=4: