Re: Languages that give "hints" to the compiler

wisej@acf4.nyu.edu (wisej)
Fri, 29 Jul 1994 02:12:36 GMT

          From comp.compilers

Related articles
Languages that give "hints" to the compiler jhummel@cy4.ICS.UCI.EDU (Joe Hummel) (1994-07-18)
Re: Languages that give "hints" to the compiler wisej@acf4.nyu.edu (1994-07-29)
Re: Languages that give "hints" to the compiler tgl@netcom.com (1994-07-19)
Re: Languages that give "hints" to the compiler jfisher@hplabsz.hpl.hp.com (1994-07-21)
Re: Languages that give "hints" to the compiler rfg@netcom.com (1994-07-31)
Languages that give "hints" to the compiler ssimmons@convex.com (1994-08-01)
Re: Languages that give "hints" to the compiler jls@summit.novell.com (1994-08-02)
Re: Languages that give "hints" to the compiler rfg@netcom.com (1994-08-03)
| List of all articles for this month |

Newsgroups: comp.compilers
From: wisej@acf4.nyu.edu (wisej)
Keywords: Fortran, history, question, optimize
Organization: New York University
References: 94-07-066
Date: Fri, 29 Jul 1994 02:12:36 GMT

Joe Hummel <jhummel@cy4.ICS.UCI.EDU> writes:


>some refs to work in this area? I'm interested in approaches for allowing
>the programmer to supply optimization information to the compiler.


>Today, the usual approaches seem to be: > - comment
statements > - #pragma > - command-line compiler
options/switches >What other approaches have languages or
compilers supported?


Well, both C and C++ have the 'register' keyword for variable declaration,
hinting that it might be more efficient to devote a register to the
variable. They both also have the 'static' and 'volatile' keywords,
although these have a real effect on code meaning, so they have
programmatic as well as optimizational uses. C++ also provides the
'inline' keyword for function declaration, allowing short, freguently-used
functions to be generated in-line instead of as function calls. In both
of these languages, explicit and aggregate initialization can be thought
of as 'hints', since the former allows variables to be set in code instead
of at execution time, and the latter allows array variables to be set
using native blockmoves, such as the 68040's MOV16 instruction, or the
80x86 line's String-Move Instructions.


                                                                Jim Wise
                                                                wisej@acf4.nyu.edu
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.