Compilers' Options

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Apr 13 15:14:00 EEST 2000


On Thu, Apr 13, 2000 at 01:24:03PM +0300, Kissandrakis Giorgos wrote:
> proteinomena flags gia optimization se Pentium Pro II/III gia ton
> egcs --version
> egcs-2.91.66
> CFLAGS='-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro
> -march=pentiumpro -fomit-frame-pointer -fno-exceptions'
> 
> dont ask :)

<!-- keramida mpainei se evil-cc-freak mode kai bour na ask amesos  -->

Loipon.  Ola kala, as poume oti meta apo ta unrolls, kai ta inlines pou
8a sou kanei auto to pragma, kai kala mou twra tha einai pio kapos to
teliko ektelesimo.  As poume oti glitoses kai ligo megethos, bgazontas
to frame-pointer, kai glitonontas tis entoles

	pushl %ebp		<--
	movl %esp,%ebp		<--
	...
	leave			<--
	ret

sto body tou kathe function sou.  Einai kapos mia allagi sto size, den
leo.  Alla afou tha se exei kanei kati fores megalutero to -O9, me ola
ta inlines pou tha kanei akoma kai ekei pou isws den xreiazontai, ti na
sou glitosei to -fomit-frame-pointer?

Ase pou an to kaloskefteis, me tin cache pou exoun oi shmerinoi
epejergastes, to na kaneis inline functions einai adikhma pou 8a eprepe
na timoreitai me dis eis 8anaton.  Skepsou tin periptosi duo function
pou kalountai se loop, kai kapoia apo autes kalei kai mia trith.  An
tuxei kai oi treis xorane stin cache mazi me to loop, to cpu sou 'tis
foraei, kai petaei'.  An kaneis unroll to loop omws, tote isws olo to
loop, mazi me tis treis functions inlined ekei pou prepei mporei na min
xoraei stin cache.  Tote ta cache-misses sou einai pio polla apo to na
min eixes ka8olou optimizations :/

Genika pantos xrhsimopoiwntas optimizations, den exo dei 'orath'
diafora, se megala programmata (opws sendmail, mozilla, klp.) metaju
-O2 kai -O6 h kati megalutero.  Mono to megethos eida na ginetai arketa
megalutero!

-- 
Giorgos Keramidas, < keramida @ ceid . upatras . gr >
For my public pgp key: finger keramida at diogenis.ceid.upatras.gr
See the headers of this message for the key finger-print.

--
linux-greek-users mailing list -- http://lists.hellug.gr




More information about the Linux-greek-users mailing list