Related articles |
---|
[9 earlier articles] |
Re: register variables in C. metaware!miker@uunet.UU.NET (1992-05-01) |
Re: register variables in C. preston@dawn.cs.rice.edu (1992-05-01) |
Re: register variables in C. bliss@sp64.csrd.uiuc.edu (1992-05-01) |
Re: register variables in C. ressler@cs.cornell.edu (1992-05-02) |
Re: register variables in C. stephen@estragon.uchicago.edu (1992-05-04) |
Re: register variables in C. macrakis@osf.org (1992-05-04) |
Re: register variables in C. gnb@bby.oz.au (1992-05-04) |
Re: register variables in C. cliffc@cs.rice.edu (1992-05-06) |
Newsgroups: | comp.compilers |
From: | gnb@bby.oz.au (Gregory N. Bond) |
Keywords: | C, registers, optimize |
Organization: | Burdett, Buckeridge & Young, Melbourne, Australia |
References: | 92-04-125 92-05-020 |
Date: | Mon, 4 May 1992 23:38:02 GMT |
ressler@cs.cornell.edu (Gene Ressler) said:
> In this context, it seems more appropriate to have programmers tag uses of
> variables rather than declarations.
Yuk!
The problem with this (inherent in any scheme, including "register", that
focuses on source language variables) is that the really chunky bits are
hidden from the programmer (such as common subexpressions, address
arithmetic etc); such schemes don't help compilers much when making
decisions about these hidden entities.
A far preferable use of effort (either programmer effort in #pragma's or
system effort in getting profiling) is to tell the compiler the likely
flow control so more informed decisions can be made.
I'm not really a compiler weenie; what is the current state of the art
w.r.t. discovering branch possibilities or loop frequencies? Do compilers
routinely differentiate between "for (i = 1; i < 3; i++)" and "for (i = 1;
i < 300; i++)" or similar constructs? What about extracting info from the
equivalent DO or WHILE loops?
Greg.
--
Gregory Bond <gnb@bby.oz.au>
Burdett Buckeridge & Young Ltd Melbourne Australia
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.