go.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. /* S H A R E D F I L E
  7. *
  8. * G O . H
  9. *
  10. */
  11. #ifdef __STDC__
  12. void go(int argc, char *argv[], int (*initialize)(void *),
  13. int (*optimize)(void *), int (*phase_machinit)(void *),
  14. int (*proc_flag)(void *));
  15. int no_action(void *dummy);
  16. void core_usage();
  17. void report(char *s, int n);
  18. #else
  19. extern go(); /* ( int argc; char *argv[];
  20. * int (*initialize)(); int (*optimize)();
  21. * int (*phase_machinit)(); int (*proc_flag)() )
  22. * This is the main driving routine of the optimizer.
  23. * It first processes the flags given as argument;
  24. * for every flag it does not recognize itself, it
  25. * calls 'proc_flag'; as soon as the -M flag is seen,
  26. * it opens the machine descriptor file and
  27. * reads phase-independend information (notably the
  28. * wordsize and pointersize of the target machine);
  29. * next it calls 'phase_machinit' with this file as
  30. * parameter. Subsequently it calls 'initialize'.
  31. * Finally, all procedures are read, one at a time,
  32. * and 'optimize' is called with the current procedure
  33. * as parameter.
  34. */
  35. extern no_action(); /* ()
  36. * Parameter to be supplied for e.g. 'initialize' if
  37. * no action is required.
  38. */
  39. extern core_usage(); /* ()
  40. * Report core usage, if core_flag is set.
  41. */
  42. extern report(); /* ( char *s; int n)
  43. * Report number of optimizations found, if
  44. * report_flag is set
  45. */
  46. #endif