* Type Information for better Optimization
@ 2003-10-03 17:53 Kevin Atkinson
0 siblings, 0 replies; only message in thread
From: Kevin Atkinson @ 2003-10-03 17:53 UTC (permalink / raw)
To: gcc
This doesn't directly relate to Gcc. However, I figured this would be a
good place to ask.
For my Ph D I am strongly considering developing a new system programming
language to which I hope can eventually replace C and C++.
One of the things my language will have is a very strong type system.
This includes pre and post conditions for functions and attributes for
variables. What I would like to know is, what type of information can a
Gcc use to generate better code? Also, when can a type specification be
to specific, to the point where in inhibits optimization?
For example type of information I am sure compilers can use (as gcc
has attributes for them)
alignment guarantees
aliasing info
if functions have side effects
An area when a type specification can be too specific:
precise rounding specifications
I also plan on providing very precious information on values a variable
can take. For integers I plan on only allowing the value to in a tight
range and/or a multiple of a power of two. I am not sure if gcc can use
this information however. One obvious area where this information could
be useful is string functions such as strcpy, if the size is always
guaranteed to be a multiple of say 4 then gcc can go ahead and copy a 32
bit word at a time. Or say that the value can only be one of 1,2,3 then
gcc can go ahead and specialize for each of those cases.
So, what other type of information could gcc use to optimize better (both
now, and in the theoretical future), and when can a specification for a
type be too specific to the point that it can inhibits optimization.
I look forward to hearing back from gcc developers.
---
http://kevin.atkinson.dhs.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-10-03 17:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-03 17:53 Type Information for better Optimization Kevin Atkinson
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).