Some questions about the C -Optimiser

martin at vax135.UUCP martin at vax135.UUCP
Fri Jun 10 13:02:10 AEST 1983


It would quite a  problem  to  look  for  operations  that  would
optimise  out  the  usage  of  a register and check for then next
statment to be a return.

The better solution would be to  do  the  calulation  in  another
register  if  the result will not be passed to a return statment.
Then the optimiser could check if the register was r0 and  if  so
then  not  do  the optimisation. This splits the work between the
compiler and the optimiser.

On another note, consider shell scripts to do edits  on  the  asm
file  after  it  has been complied.  Why not have a flag to cc to
allow the passing of a program  to  be  placed  in  the  pipeline
between c2 and as.

How about:-
	$ cc main.c -O -SH :rofix -o main

martin levy.



More information about the Comp.unix.wizards mailing list