Sujet : Re: Ichbiah 2022 compiler mode
De : randy (at) *nospam* rrsoftware.com (Randy Brukardt)
Groupes : comp.lang.adaDate : 24. Dec 2024, 02:03:53
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vkd19q$1fl5o$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Microsoft Outlook Express 6.00.2900.5931
"G.B." <
bauhaus@notmyhomepage.invalid> wrote in message
news:vk6tag$4tm1$1@dont-email.me...On 21.12.24 09:14, Randy Brukardt wrote:
...
Constants do help the compiler generate better code, although a lot of
the
benefits can be gained also by working harder. (That's what C compilers
do,
after all.)
>
What are some compilers offering today? That is, can they find
declarations
of variables that could be constants, if so instructed?
I was thinking from a code generation perspective, as opposed to static
analysis. These are really the same process, but in one case the output is
only for a computer, and in the other, the output is for a human. The needs
of those outputs are quite different. I think a lot of compilers do
optimizations of constants by discovery, but few compilers do much beyond
rudimentary static analysis. I expect that to change, but I may be an
optimist on that...
Randy.