comp.lang.ada
 help / color / mirror / Atom feed
From: Per Jakobsen <pdj@knaldgas.dk>
Subject: Re: Odd AVR-Ada code generation issue with constant record type
Date: Tue, 9 Jul 2019 11:10:45 -0700 (PDT)
Date: 2019-07-09T11:10:45-07:00	[thread overview]
Message-ID: <10636118-7dac-439f-ad19-65900d364358@googlegroups.com> (raw)
In-Reply-To: <b78a975c-8ef1-41ac-b4c2-c1c07675765a@googlegroups.com>

Right, so even GCC 9.1 chooses to load a constant from memory instead of loading as immediate, 2-3 cycles instead of 1 as well as using additional memory space. I wonder why GCC does not optimize this... It seems like a simple optimization, but then again, I'm no compiler developer so easy for me to say...

I just tried with arm-linux-gnueabihf-gnatmake and x86_64-linux-gnu-gnatmake both version 8.3, and both use the slower load from memory instead of load immediate.

I wonder if it is an Ada-specific thing, or a general GCC back-end deficiency?...

  parent reply	other threads:[~2019-07-09 18:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05  8:57 Odd AVR-Ada code generation issue with constant record type Per Jakobsen
2019-07-05  9:24 ` Mark Lorenzen
2019-07-05 12:19 ` Per Jakobsen
2019-07-08 14:49   ` Stéphane Rivière
2019-07-09 12:12 ` Per Jakobsen
2019-07-09 15:30 ` Simon Wright
2019-07-09 18:10 ` Per Jakobsen [this message]
2019-07-09 18:46 ` Per Jakobsen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox