1 /* $Id: sr.h,v 1.8 1994/06/24 10:32:00 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 /* I N T E R N A L D A T A S T R U C T U R E S O F
8 * S T R E N G T H R E D U C T I O N
12 typedef struct iv *iv_p;
13 typedef struct code_info *code_p;
15 /* An induction variable */
18 offset iv_off; /* offset of the induction variable */
19 line_p iv_incr; /* pointer to last instr. of EM-code that
20 * increments the induction variable */
21 offset iv_step; /* step value */
25 /* All information about a reducible piece of code is collected in
30 loop_p co_loop; /* the loop the code is in */
31 bblock_p co_block; /* the basic block the code is in */
32 line_p co_lfirst; /* first instruction of the code */
33 line_p co_llast; /* last instruction of the code */
34 line_p co_ivexpr; /* start of linear expr. using iv */
35 line_p co_endexpr; /* end of the expression */
36 int co_sign; /* sign of iv in above expr */
37 iv_p co_iv; /* the induction variable */
38 offset co_temp; /* temporary variable */
39 int co_tmpsize; /* size of the temp. variable (ws or ps)*/
40 int co_instr; /* the expensive instruction (mli,lar..)*/
42 line_p co_loadlc; /* LOC lc instruction (for mult.)*/
43 line_p co_desc; /* load address of descriptor
51 #define DLINK(l1,l2) l1->l_next=l2; l2->l_prev=l1
53 #define same_local(l1,l2) (off_set(l1) == off_set(l2))
55 #define LP_BLOCKS lp_extend->lpx_sr.lpx_blocks
56 #define LP_DONE lp_extend->lpx_sr.lpx_done
57 #define LP_HEADER lp_extend->lpx_sr.lpx_header
58 #define LP_INSTR lp_extend->lpx_sr.lpx_instr
60 /* Parameters to be provided by environment: */
62 extern int ovfl_harmful; /* Does overflow during multiplication
65 extern int arrbound_harmful; /* Is it harmful to take the address of
66 * a non-existing array element ?
68 extern int sli_threshold; /* Try to optimize SLI if shift-count larger than
71 extern int Ssr; /* #optimizations found */
73 /* core allocation macros */
74 #define newiv() (iv_p) newstruct(iv)
75 #define newcinfo() (code_p) newstruct(code_info)
76 #define newsrlpx() (lpext_p) newstruct(lpext_sr)
77 #define oldiv(x) oldstruct(iv,x)
78 #define oldcinfo(x) oldstruct(code_info,x)
79 #define oldsrlpx(x) oldstruct(lpext_sr,x)