more questions about efficient C code

Arnold Robbins arnold at gatech.CSNET
Thu Jul 4 03:48:56 AEST 1985


> >One is to write a simple test program and use the '-S'
> >flag of the compiler.  This will produce assembly code
> >that you can examine and see what intructions are being
> >generated for any particular expression.
> 
> Unfortunately, this option is not likely to show you the
> optimized code you would get from running the compiler with
> the -O flag.  To really see what's being generated, compile
> it, and then look at the object file with something like
> foo,24?ai
> in adb.

Sorry, but 'cc' is smart enough to run the optimizer on the assembler
if you give it 'cc -S -O foo.c'.  foo.s will be optimized assembly.
-- 
Arnold Robbins
CSNET:	arnold at gatech	ARPA:	arnold%gatech.csnet at csnet-relay.arpa
UUCP:	{ akgua, allegra, hplabs, ihnp4, seismo, ut-sally }!gatech!arnold

Hello. You have reached the Coalition to Eliminate Answering Machines.
Unfortunately, no one can come to the phone right now....



More information about the Comp.lang.c mailing list