[comp.unix.microport] Optomizer

mrspock@hubcap.UUCP (Steve Benz) (05/17/88)

From article <229@eutrc3.UUCP>, by wswietse@eutrc3.UUCP (Wietse Venema):
> No problem compiling nethack. Just don't use the optimizer.

  Has anybody found any redeaming features of the Optomizer on 286
Microport?  I haven't.  All I know is that with the optomizer turned
on, you get:

  1) A good chance of compiler failure.
  2) Given #1, it seems to me that there are probably cases where
     the optomizer will produce bad code without telling you.
  3) Compile times that are about twice as long as without the optomizer.
  4) About 2-4% faster code.

  You can draw your own conclusions from this.  But as for me,
I turn the optomizer off as a matter of course when I get new
software, and never compile without '-g' when doing my own stuff.

				- Steve Benz

wtr@moss.ATT.COM (05/18/88)

In article <1640@hubcap.UUCP> mrspock@hubcap.UUCP (Steve Benz) writes:

>[with the compiler you get.....]
>  4) About 2-4% faster code.

help! anyone!

i don't need an increase in speed!  i need a DECREASE in size!
(da*n those segments)

i have source that will only compile for small model,
and will only fit into 64k/64k with optimization to 
decrease it's size!

this may be real stupid and obvious to some, but,...
is there a way to turn on JUST the size optimization
(you can do it in msc 4.0, but i haven't noticed it
for pcc)

please mail responses, or post if you view it important.

thanks for the help.

=====================================================================
Bill Rankin
Bell Labs, Whippany NJ
(201) 386-4154 (cornet 232)

email address:		...![ ihnp4 ulysses cbosgd allegra ]!moss!wtr
			...![ ihnp4 cbosgd akgua watmath  ]!clyde!wtr
=====================================================================

mdg@smegma.UUCP (Marc de Groot) (05/18/88)

In article <1640@hubcap.UUCP> mrspock@hubcap.UUCP (Steve Benz) writes:
>  Has anybody found any redeaming features of the Optomizer on 286
>Microport?  I haven't.  All I know is that with the optomizer turned
>on, you get:
>  1) A good chance of compiler failure.

Just a quick note that down at Microport, we compile the entire kernel
with the optimizer turned on and don't have any problems. That's not to
say they don't exist, but we have had good success with the optimizer.

-- 
Marc de Groot (KG6KF)
UUCP: {hplabs, sun, ucbvax}!amdcad!uport!smegma!mdg
AMATEUR PACKET RADIO: KG6KF @ KB6IRS 
"Look, he's mounting a tape!" "Quick, throw cold water on him!"

mjy@sdti.UUCP (Michael J. Young) (05/23/88)

In article <400@smegma.UUCP> mdg@smegma.UUCP (Marc de Groot) writes:
>Just a quick note that down at Microport, we compile the entire kernel
>with the optimizer turned on and don't have any problems. That's not to
>say they don't exist, but we have had good success with the optimizer.

Gee, maybe now we know the source of dual-drive disk I/O errors!  :-)

Seriously, though, either that optimizer doesn't do anything useful, or
you will eventually run into problems with the driver code.  Most of
the discussion in comp.lang.c about use of 'volatile' should make it
clear why optimizers and device drivers don't mix well.
-- 
Mike Young - Software Development Technologies, Inc., Sudbury MA 01776
UUCP     : {decvax,harvard,linus,mit-eddie}!necntc!necis!mrst!sdti!mjy
Internet : mjy%sdti.uucp@harvard.harvard.edu      Tel: +1 617 443 5779
"Bill & Opus in '88" -- Consider the alternatives!

mdg@smegma.UUCP (Marc de Groot) (05/26/88)

In article <270@sdti.UUCP> mjy@sdti.UUCP (0000-Michael J. Young) writes:
>Gee, maybe now we know the source of dual-drive disk I/O errors!  :-)
>Seriously, though, either that optimizer doesn't do anything useful, or
>you will eventually run into problems with the driver code.

Hmmm... I hope you're wrong, but it's worth a try... I am working on the
2-drive problem right now...

If anyone has any ideas on what might be causing it, I am always open
to suggestions.

Don't mail to me at this address (mdg@smegma.UUCP); this is my home.
Send mail to me at uport (mdg@uport.UUCP or uunet!uport!mdg).

Thanks.
-- 
Marc de Groot (KG6KF)
UUCP: {hplabs, sun, ucbvax}!amdcad!uport!smegma!mdg
AMATEUR PACKET RADIO: KG6KF @ KB6IRS 
"Look, he's mounting a tape!" "Quick, throw cold water on him!"

scott@cdp.UUCP (05/26/88)

Really, using -O is bad news on V/386; it generates bug, and it
doesn't do much anyway.  I'll tell Marc de Groot about this in
the next few days.

-scott