public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Penitum II & egcs 1.1.1 oddity
@ 1999-01-22  3:18 Barry Shilliday
  1999-01-22  7:24 ` Jeffrey A Law
  1999-01-31 23:58 ` Barry Shilliday
  0 siblings, 2 replies; 12+ messages in thread
From: Barry Shilliday @ 1999-01-22  3:18 UTC (permalink / raw)
  To: egcs

I've compiled egcs 1.1.1 having tried the standard 1.1.1 release and the
1.1.1 patched release.  I've compiled on RedHat Linux 5.2 / PII 400.  I
compiled using 'configure --enable-shared --enable-haifa'.

Is it normal that the compiler is sending -mcpu=pentiumpro but
-march=pentium by default?  For example, this is the output from 'gcc
-fverbose-asm -S test.c'

# GNU C version egcs-2.91.60.1 19990115/Linux (egcs-1.1.1 release)
(i686-pc-linux-gnu) compiled by GNU C version egcs-2.91.60.1
19990115/Linux (egcs-1.1.1 release).
# options passed:  -fverbose-asm
# options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
# -fpcc-struct-return -fsched-interblock -fsched-spec -fcommon
# -fverbose-asm -fgnu-linker -fargument-alias -m80387 -mhard-float
# -mno-soft-float -mieee-fp -mfp-ret-in-387 -mschedule-prologue
# -mcpu=pentiumpro -march=pentium

Does it make a lot of difference compiling using -march=pentium as
opposed to -march=pentiumpro on a Pentium II?

Any comments appreciated

-- 
Barry Shilliday

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Penitum II & egcs 1.1.1 oddity
  1999-01-22  3:18 Penitum II & egcs 1.1.1 oddity Barry Shilliday
@ 1999-01-22  7:24 ` Jeffrey A Law
  1999-01-22  8:32   ` Barry
  1999-01-31 23:58   ` Jeffrey A Law
  1999-01-31 23:58 ` Barry Shilliday
  1 sibling, 2 replies; 12+ messages in thread
From: Jeffrey A Law @ 1999-01-22  7:24 UTC (permalink / raw)
  To: barry; +Cc: egcs

  In message < 36A85F12.653EF986@nibelung.demon.co.uk >you write:
  > I've compiled egcs 1.1.1 having tried the standard 1.1.1 release and the
  > 1.1.1 patched release.  I've compiled on RedHat Linux 5.2 / PII 400.  I
  > compiled using 'configure --enable-shared --enable-haifa'.
  > 
  > Is it normal that the compiler is sending -mcpu=pentiumpro but
  > -march=pentium by default?  For example, this is the output from 'gcc
  > -fverbose-asm -S test.c'
Yes, this is normal.

It means schedule for a ppro, but generate (effectively) common-mode
instructions (ie your code can run on all x86 variants).


  > Does it make a lot of difference compiling using -march=pentium as
  > opposed to -march=pentiumpro on a Pentium II?
"a lot" is a relative term.

-march=pentiumpro will enable ppro specific instructions, namely conditional
moves, which for some code can be a nice improvement.  For other code it won't
help in any noticable way.  Just depends on your application.

jeff


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: Penitum II & egcs 1.1.1 oddity
  1999-01-22  7:24 ` Jeffrey A Law
@ 1999-01-22  8:32   ` Barry
  1999-01-22  8:56     ` Jeffrey A Law
  1999-01-31 23:58     ` Barry
  1999-01-31 23:58   ` Jeffrey A Law
  1 sibling, 2 replies; 12+ messages in thread
From: Barry @ 1999-01-22  8:32 UTC (permalink / raw)
  To: law; +Cc: egcs

>   > Does it make a lot of difference compiling using -march=pentium as
>   > opposed to -march=pentiumpro on a Pentium II?
> "a lot" is a relative term.
>
> -march=pentiumpro will enable ppro specific instructions, namely
> conditional
> moves, which for some code can be a nice improvement.  For other
> code it won't
> help in any noticable way.  Just depends on your application.
>
Thanks for the information.  I'd be correct in assuming
that -march=pentiumpro would never cause a loss of performance
over -march=pentium?

--
Barry


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Penitum II & egcs 1.1.1 oddity
  1999-01-22  8:32   ` Barry
@ 1999-01-22  8:56     ` Jeffrey A Law
  1999-01-31 23:58       ` Jeffrey A Law
  1999-01-31 23:58     ` Barry
  1 sibling, 1 reply; 12+ messages in thread
From: Jeffrey A Law @ 1999-01-22  8:56 UTC (permalink / raw)
  To: Barry; +Cc: egcs

  In message < 000201be4624$e16f7e60$71aa989e@nibelung >you write:
  > >   > Does it make a lot of difference compiling using -march=pentium as
  > >   > opposed to -march=pentiumpro on a Pentium II?
  > > "a lot" is a relative term.
  > >
  > > -march=pentiumpro will enable ppro specific instructions, namely
  > > conditional
  > > moves, which for some code can be a nice improvement.  For other
  > > code it won't
  > > help in any noticable way.  Just depends on your application.
  > >
  > Thanks for the information.  I'd be correct in assuming
  > that -march=pentiumpro would never cause a loss of performance
  > over -march=pentium?
"never" is an extremely strong word.  Given time I could probably come up
with cases where cmoves could hurt.  For example, by lengthening a basic block
we could expose more loop invariants to the loop optimizer, which would pull
them out the loop, increasing register pressure inside the loop, which could
calls spills in the loop and possibly a net loss in performance.

Having said that, I would expect any loss of performance due to using that
option to be rare relative to the performance gains.


jeff

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Penitum II & egcs 1.1.1 oddity
  1999-01-22  7:24 ` Jeffrey A Law
  1999-01-22  8:32   ` Barry
@ 1999-01-31 23:58   ` Jeffrey A Law
  1 sibling, 0 replies; 12+ messages in thread
From: Jeffrey A Law @ 1999-01-31 23:58 UTC (permalink / raw)
  To: barry; +Cc: egcs

  In message < 36A85F12.653EF986@nibelung.demon.co.uk >you write:
  > I've compiled egcs 1.1.1 having tried the standard 1.1.1 release and the
  > 1.1.1 patched release.  I've compiled on RedHat Linux 5.2 / PII 400.  I
  > compiled using 'configure --enable-shared --enable-haifa'.
  > 
  > Is it normal that the compiler is sending -mcpu=pentiumpro but
  > -march=pentium by default?  For example, this is the output from 'gcc
  > -fverbose-asm -S test.c'
Yes, this is normal.

It means schedule for a ppro, but generate (effectively) common-mode
instructions (ie your code can run on all x86 variants).


  > Does it make a lot of difference compiling using -march=pentium as
  > opposed to -march=pentiumpro on a Pentium II?
"a lot" is a relative term.

-march=pentiumpro will enable ppro specific instructions, namely conditional
moves, which for some code can be a nice improvement.  For other code it won't
help in any noticable way.  Just depends on your application.

jeff

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Penitum II & egcs 1.1.1 oddity
  1999-01-22  8:56     ` Jeffrey A Law
@ 1999-01-31 23:58       ` Jeffrey A Law
  0 siblings, 0 replies; 12+ messages in thread
From: Jeffrey A Law @ 1999-01-31 23:58 UTC (permalink / raw)
  To: Barry; +Cc: egcs

  In message < 000201be4624$e16f7e60$71aa989e@nibelung >you write:
  > >   > Does it make a lot of difference compiling using -march=pentium as
  > >   > opposed to -march=pentiumpro on a Pentium II?
  > > "a lot" is a relative term.
  > >
  > > -march=pentiumpro will enable ppro specific instructions, namely
  > > conditional
  > > moves, which for some code can be a nice improvement.  For other
  > > code it won't
  > > help in any noticable way.  Just depends on your application.
  > >
  > Thanks for the information.  I'd be correct in assuming
  > that -march=pentiumpro would never cause a loss of performance
  > over -march=pentium?
"never" is an extremely strong word.  Given time I could probably come up
with cases where cmoves could hurt.  For example, by lengthening a basic block
we could expose more loop invariants to the loop optimizer, which would pull
them out the loop, increasing register pressure inside the loop, which could
calls spills in the loop and possibly a net loss in performance.

Having said that, I would expect any loss of performance due to using that
option to be rare relative to the performance gains.


jeff

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: Penitum II & egcs 1.1.1 oddity
  1999-01-22  8:32   ` Barry
  1999-01-22  8:56     ` Jeffrey A Law
@ 1999-01-31 23:58     ` Barry
  1 sibling, 0 replies; 12+ messages in thread
From: Barry @ 1999-01-31 23:58 UTC (permalink / raw)
  To: law; +Cc: egcs

>   > Does it make a lot of difference compiling using -march=pentium as
>   > opposed to -march=pentiumpro on a Pentium II?
> "a lot" is a relative term.
>
> -march=pentiumpro will enable ppro specific instructions, namely
> conditional
> moves, which for some code can be a nice improvement.  For other
> code it won't
> help in any noticable way.  Just depends on your application.
>
Thanks for the information.  I'd be correct in assuming
that -march=pentiumpro would never cause a loss of performance
over -march=pentium?

--
Barry

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Penitum II & egcs 1.1.1 oddity
  1999-01-22  3:18 Penitum II & egcs 1.1.1 oddity Barry Shilliday
  1999-01-22  7:24 ` Jeffrey A Law
@ 1999-01-31 23:58 ` Barry Shilliday
  1 sibling, 0 replies; 12+ messages in thread
From: Barry Shilliday @ 1999-01-31 23:58 UTC (permalink / raw)
  To: egcs

I've compiled egcs 1.1.1 having tried the standard 1.1.1 release and the
1.1.1 patched release.  I've compiled on RedHat Linux 5.2 / PII 400.  I
compiled using 'configure --enable-shared --enable-haifa'.

Is it normal that the compiler is sending -mcpu=pentiumpro but
-march=pentium by default?  For example, this is the output from 'gcc
-fverbose-asm -S test.c'

# GNU C version egcs-2.91.60.1 19990115/Linux (egcs-1.1.1 release)
(i686-pc-linux-gnu) compiled by GNU C version egcs-2.91.60.1
19990115/Linux (egcs-1.1.1 release).
# options passed:  -fverbose-asm
# options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
# -fpcc-struct-return -fsched-interblock -fsched-spec -fcommon
# -fverbose-asm -fgnu-linker -fargument-alias -m80387 -mhard-float
# -mno-soft-float -mieee-fp -mfp-ret-in-387 -mschedule-prologue
# -mcpu=pentiumpro -march=pentium

Does it make a lot of difference compiling using -march=pentium as
opposed to -march=pentiumpro on a Pentium II?

Any comments appreciated

-- 
Barry Shilliday

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: Penitum II & egcs 1.1.1 oddity
  1999-01-23  5:36 ` Barry
@ 1999-01-31 23:58   ` Barry
  0 siblings, 0 replies; 12+ messages in thread
From: Barry @ 1999-01-31 23:58 UTC (permalink / raw)
  To: egcs

> << Does it make a lot of difference compiling using -march=pentium as
>  opposed to -march=pentiumpro on a Pentium II? >>
> Unlikely to make much difference, although there appears to be a latent
> problem with -march=pentiumpro in i386.md which Jeff Law just
> diagnosed this
> week.  It's never bitten me with egcs-1.1.1 but you never know.

Thanks for the information.  I'll modify the spec file to
set -march=pentiumpro by default for the time being.

--
Barry

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Penitum II & egcs 1.1.1 oddity
  1999-01-22 19:05 N8TM
  1999-01-23  5:36 ` Barry
@ 1999-01-31 23:58 ` N8TM
  1 sibling, 0 replies; 12+ messages in thread
From: N8TM @ 1999-01-31 23:58 UTC (permalink / raw)
  To: barry, egcs

In a message dated 1/22/99 3:23:54 AM Pacific Standard Time,
barry@nibelung.demon.co.uk writes:

<< Does it make a lot of difference compiling using -march=pentium as
 opposed to -march=pentiumpro on a Pentium II? >>
Unlikely to make much difference, although there appears to be a latent
problem with -march=pentiumpro in i386.md which Jeff Law just diagnosed this
week.  It's never bitten me with egcs-1.1.1 but you never know.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: Penitum II & egcs 1.1.1 oddity
  1999-01-22 19:05 N8TM
@ 1999-01-23  5:36 ` Barry
  1999-01-31 23:58   ` Barry
  1999-01-31 23:58 ` N8TM
  1 sibling, 1 reply; 12+ messages in thread
From: Barry @ 1999-01-23  5:36 UTC (permalink / raw)
  To: egcs

> << Does it make a lot of difference compiling using -march=pentium as
>  opposed to -march=pentiumpro on a Pentium II? >>
> Unlikely to make much difference, although there appears to be a latent
> problem with -march=pentiumpro in i386.md which Jeff Law just
> diagnosed this
> week.  It's never bitten me with egcs-1.1.1 but you never know.

Thanks for the information.  I'll modify the spec file to
set -march=pentiumpro by default for the time being.

--
Barry


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Penitum II & egcs 1.1.1 oddity
@ 1999-01-22 19:05 N8TM
  1999-01-23  5:36 ` Barry
  1999-01-31 23:58 ` N8TM
  0 siblings, 2 replies; 12+ messages in thread
From: N8TM @ 1999-01-22 19:05 UTC (permalink / raw)
  To: barry, egcs

In a message dated 1/22/99 3:23:54 AM Pacific Standard Time,
barry@nibelung.demon.co.uk writes:

<< Does it make a lot of difference compiling using -march=pentium as
 opposed to -march=pentiumpro on a Pentium II? >>
Unlikely to make much difference, although there appears to be a latent
problem with -march=pentiumpro in i386.md which Jeff Law just diagnosed this
week.  It's never bitten me with egcs-1.1.1 but you never know.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~1999-01-31 23:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-22  3:18 Penitum II & egcs 1.1.1 oddity Barry Shilliday
1999-01-22  7:24 ` Jeffrey A Law
1999-01-22  8:32   ` Barry
1999-01-22  8:56     ` Jeffrey A Law
1999-01-31 23:58       ` Jeffrey A Law
1999-01-31 23:58     ` Barry
1999-01-31 23:58   ` Jeffrey A Law
1999-01-31 23:58 ` Barry Shilliday
1999-01-22 19:05 N8TM
1999-01-23  5:36 ` Barry
1999-01-31 23:58   ` Barry
1999-01-31 23:58 ` N8TM

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).