www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/05/10/13:10:39

X-Authentication-Warning: sal.physics.ucsb.edu: dwhysong owned process doing -bs
Date: Mon, 10 May 1999 10:07:07 -0700 (PDT)
From: David Whysong <dwhysong AT physics DOT ucsb DOT edu>
To: pgcc AT delorie DOT com
Subject: Re: Optimization question
Message-ID: <Pine.LNX.4.04.9905100957550.13449-100000@sal.physics.ucsb.edu>
MIME-Version: 1.0
Reply-To: pgcc AT delorie DOT com

"Bernd Melchers" wrote:

> good compilers should optimize such expressions by itself, the method
> is called "common subexpression optimization".

That's exactly what I thought, but...

This morning I've been playing around with assembler dumps. Doing
subexpression elimination by hand has reduced the number of fmul
instructions considerably (as verified by "grep fmul junk.c | wc"),
though for some reason there are a few more fadd instructions.

Dave

David Whysong                                       dwhysong AT physics DOT ucsb DOT edu
Astrophysics graduate student         University of California, Santa Barbara
My public PGP keys are on my web page - http://www.physics.ucsb.edu/~dwhysong
DSS PGP Key 0x903F5BD6  :  FE78 91FE 4508 106F 7C88  1706 B792 6995 903F 5BD6
D-H PGP key 0x5DAB0F91  :  BC33 0F36 FCCD E72C 441F  663A 72ED 7FB7 5DAB 0F91

- Raw text -


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