delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/13/10:30:12

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: -O6 optimizations
Date: 13 May 2001 14:20:21 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 34
Message-ID: <9dm575$sqh$1@nets3.rz.RWTH-Aachen.DE>
References: <2rVK6.20535$z01 DOT 3117219 AT carnaval DOT risq DOT qc DOT ca>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 989763621 29521 137.226.32.75 (13 May 2001 14:20:21 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 13 May 2001 14:20:21 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Patrick Mitran <pmitran AT tsp DOT ece DOT mcgill DOT ca> wrote:

> I'm using gcc 2.95.3. I was wondering where I could get a list of all the
> optimizations that are turned on by -O6. 

About the most complete description of this can be had by asking GCC itself
to show it:

	redir -eo O6.txt gcc -c -v -Q -O6 hello.c

Look into the O6.txt file, right after the banner line from 'cc1'. There's
a list of all single options in effect in this GCC run. An example from 
a very old Linux box:

GNU C version 2.7.2 (i386 Linux/ELF) compiled by GNU C version 2.7.2.
enabled: -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks \
         -fexpensive-optimizations
         -fthread-jumps -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse
         -finline-functions -finline -fcaller-saves -fpcc-struct-return
         -frerun-cse-after-loop -fcommon -fgnu-linker -m80387 -mhard-float
         -mno-soft-float -mno-386 -m486 -mieee-fp -mfp-ret-in-387


> Also, do I have to add the -mpentium switch too or is this inclused
> in -O6.

No. "Optimization" should have different effects for different
processor types. Otherwise, -mpentium and friends would be
pointless. Architecture or CPU type settings are thus independent from
optimization flags.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019