ud_copy.h 1.6 KB

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