ack/util/ego/share/utils.h

79 lines
2.1 KiB
C
Raw Normal View History

1994-06-24 11:31:16 +00:00
/* $Id$ */
1987-03-09 19:15:41 +00:00
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
1984-11-26 15:04:22 +00:00
/* S H A R E D
*
* A U X I L I A R Y R O U T I N E S
*
*/
offset off_set(line_p lnp); /*
1984-11-26 15:04:22 +00:00
* lnp has a SHORT or OFFSET operand. Return
* the value of this operand as an offset.
*/
offset aoff(arg_p list, int n); /*
1984-11-26 15:04:22 +00:00
* Determine the offset field of the
* n'th argument in the list (this argument
* must have type ARGOFF). Start counting at 0.
*/
offset tmplocal(proc_p p, offset size);
/*
1984-11-26 15:04:22 +00:00
* Allocate a new local variable in the
* stack frame of p.
*/
line_p int_line(offset off); /*
1984-11-26 15:04:22 +00:00
* Allocate a line struct of type OPSHORT
* or OPOFFSET, whichever one fits best.
*/
line_p reg_mes(offset tmp, short size, int typ, int score);
/*
1984-11-26 15:04:22 +00:00
* Generate a register message with the
* given arguments.
*/
bool dom(bblock_p b1, bblock_p b2);
/*
* See if b1 dominates b2. Note that a
2018-02-05 21:09:30 +00:00
* block always dominates itself.
1984-11-26 15:04:22 +00:00
*/
bblock_p common_dom(bblock_p a, bblock_p b);
/*
* Find a basic block that dominates a as
* well as b; note that a basic block also
1984-11-26 15:04:22 +00:00
* dominates itself.
*/
short add_timespace(short time, short space);
/*
* Add together a time and space, using
* the time_space_ratio parameter that
1984-11-26 15:04:22 +00:00
* may be set by the user.
*/
void rm_line(line_p l, bblock_p b);
/*
1984-11-26 15:04:22 +00:00
* Remove line l from b basic block b.
*/
void appnd_line(line_p l1, line_p l2);
/*
1984-11-26 15:04:22 +00:00
* Put line l1 after l2.
*/
line_p last_instr(bblock_p b); /*
1984-11-26 15:04:22 +00:00
* Determine the last line of a basic block.
*/
line_p find_mesreg(offset off); /*
* Find the register message for the local
1984-11-26 15:04:22 +00:00
* with the given offset.
*/
bool is_regvar(offset off); /*
1984-11-26 15:04:22 +00:00
* See if there is a 'register message'
* for the local variable with the
* given offset.
*/
offset regv_arg(offset off, int n);
/*
1984-11-26 15:04:22 +00:00
* Fetch the n'th argument of the
* register message of the local with
* the given offset.
*/