Declarations for iv and code_info added (moved from types.h).
core allocation macros added.
This commit is contained in:
parent
90df1e5b9a
commit
39891edd12
|
@ -5,6 +5,42 @@
|
|||
*/
|
||||
|
||||
|
||||
typedef struct iv *iv_p;
|
||||
typedef struct code_info *code_p;
|
||||
|
||||
/* An induction variable */
|
||||
|
||||
struct iv {
|
||||
offset iv_off; /* offset of the induction variable */
|
||||
line_p iv_incr; /* pointer to last instr. of EM-code that
|
||||
* increments the induction variable */
|
||||
offset iv_step; /* step value */
|
||||
};
|
||||
|
||||
|
||||
/* All information about a reducible piece of code is collected in
|
||||
* a single structure.
|
||||
*/
|
||||
|
||||
struct code_info {
|
||||
loop_p co_loop; /* the loop the code is in */
|
||||
bblock_p co_block; /* the basic block the code is in */
|
||||
line_p co_lfirst; /* first instruction of the code */
|
||||
line_p co_llast; /* last instruction of the code */
|
||||
line_p co_ivexpr; /* start of linear expr. using iv */
|
||||
line_p co_endexpr; /* end of the expression */
|
||||
int co_sign; /* sign of iv in above expr */
|
||||
iv_p co_iv; /* the induction variable */
|
||||
offset co_temp; /* temporary variable */
|
||||
int co_tmpsize; /* size of the temp. variable (ws or ps)*/
|
||||
int co_instr; /* the expensive instruction (mli,lar..)*/
|
||||
union {
|
||||
line_p co_loadlc; /* LOC lc instruction (for mult.)*/
|
||||
line_p co_desc; /* load address of descriptor
|
||||
* (for lar etc.) */
|
||||
} c_o;
|
||||
};
|
||||
|
||||
#define LOAD 0
|
||||
#define STORE 1
|
||||
|
||||
|
@ -26,3 +62,11 @@ extern bool arrbound_harmful; /* Is it harmful to take the address of
|
|||
* a non-existing array element ?
|
||||
*/
|
||||
extern int Ssr; /* #optimizations found */
|
||||
|
||||
/* core allocation macros */
|
||||
#define newiv() (iv_p) newstruct(iv)
|
||||
#define newcinfo() (code_p) newstruct(code_info)
|
||||
#define newsrlpx() (lpext_p) newstruct(lpext_sr)
|
||||
#define oldiv(x) oldstruct(iv,x)
|
||||
#define oldcinfo(x) oldstruct(code_info,x)
|
||||
#define oldsrlpx(x) oldstruct(lpext_sr,x)
|
||||
|
|
Loading…
Reference in a new issue