1 /* $Id: ud_copy.h,v 1.4 1994/06/24 10:33:29 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".
7 /* C O P Y P R O P A G A T I O N */
9 extern line_p *copies; /* table of copies; every entry points to the
12 extern short *def_to_copynr; /* Table that maps a 'definition'-number to a
15 extern short nrcopies; /* number of copies in the current procedure
16 * (length of copies-table)
19 extern copy_analysis(); /* (proc_p p)
20 * Determine which copies procedure p has.
21 * Compute C_IN(b), for every basic block b.
23 extern bool is_copy(); /* (line_p def)
24 * See if the definition def is also a 'copy',
25 * i.e. an statement of the form
26 * 'A := B' (or, in EM terminology:
27 * a sequence 'Load Variable; Store Variable').
29 extern fold_var(); /* (line_p old,new; bblock_p b)
30 * The variable referenced by the
31 * EM instruction 'old' must be replaced
32 * by the variable referenced by 'new'.
34 extern bool value_retained(); /* (line_p copy; short defnr; line_p use;
36 * See if the right hand side variable of the
37 * copy still has the same value at 'use'.
38 * If the copy and the use are in the same
39 * basic block (defnr = 0), search from the
40 * copy to the use, to see if the rhs variable
41 * is changed. If the copy is in another block,
42 * defnr is the definition-number of the copy.
43 * Search from the beginning of the block to
44 * the use, to see if the rhs is changed;
45 * if not, check that the copy is in C_IN(b).