Pristine Ack-5.5
[Ack-5.5.git] / util / ego / share / aux.h
1 /* $Id: aux.h,v 1.5 1994/06/24 10:29:29 ceriel Exp $ */
2 /*
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".
5  */
6 /*  S H A R E D
7  *
8  *  A U X I L I A R Y   R O U T I N E S
9  *
10  */
11
12
13 extern offset off_set();        /* (line_p lnp)
14                                  * lnp has a SHORT or OFFSET operand. Return
15                                  * the value of this operand as an offset.
16                                  */
17 extern  offset aoff();          /* (arg_p list; int n)
18                                  * Determine the offset field of the
19                                  * n'th argument in the list (this argument
20                                  * must have type ARGOFF). Start counting at 0.
21                                  */
22 extern  offset tmplocal();      /* (proc_p p, offset size)
23                                  * Allocate a new local variable in the
24                                  * stack frame of p.
25                                  */
26 line_p int_line();              /* (offset off)
27                                  * Allocate a line struct of type OPSHORT
28                                  * or OPOFFSET, whichever one fits best.
29                                  */
30 extern line_p reg_mes();        /* (offset tmp; short size; int typ,score)
31                                  * Generate a register message with the
32                                  * given arguments.
33                                  */
34 extern bool dom();              /* (bblock_p b1,b2)
35                                 /* See if b1 dominates b2. Note that a
36                                  * block always * dominates itself.
37                                  */
38 extern bblock_p common_dom();   /* (bblock_p a,b)
39                                  * find a basic block that dominates a as 
40                                  * well as b; note that a basic block also 
41                                  * dominates itself.
42                                  */
43 extern short add_timespace();   /* (short time,space)
44                                  * Add together a time and space, using 
45                                  * the time_space_ratio parameter that 
46                                  * may be set by the user.
47                                  */
48 extern rm_line();               /* ( line_p l; bblock_p b)
49                                  * Remove line l from b basic block b.
50                                  */
51
52 extern appnd_line();            /* ( line_p l1,l2)
53                                  * Put line l1 after l2.
54                                  */
55 extern line_p last_instr();     /* ( bblock_p b)
56                                  * Determine the last line of a basic block.
57                                  */
58 extern line_p find_mesreg();    /* (offset off)
59                                  * Find the register message for the local 
60                                  * with the given offset.
61                                  */
62 extern  bool    is_regvar();    /* (offset off)
63                                  * See if there is a 'register message'
64                                  * for the local variable with the
65                                  * given offset.
66                                  */
67 extern offset   regv_arg();     /* (offset off; int n)
68                                  * Fetch the n'th argument of the
69                                  * register message of the local with
70                                  * the given offset.
71                                  */