From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a0c:b909:: with SMTP id u9mr20761381qvf.10.1562695845726; Tue, 09 Jul 2019 11:10:45 -0700 (PDT) X-Received: by 2002:aca:5ac6:: with SMTP id o189mr756838oib.37.1562695845297; Tue, 09 Jul 2019 11:10:45 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!b26no4136554qtq.0!news-out.google.com!a5ni364qtd.0!nntp.google.com!b26no4136552qtq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 9 Jul 2019 11:10:45 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.204.137.153; posting-account=9DmjiwoAAAD-KD7MAll0qPzDsSqXm2Qs NNTP-Posting-Host: 85.204.137.153 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <10636118-7dac-439f-ad19-65900d364358@googlegroups.com> Subject: Re: Odd AVR-Ada code generation issue with constant record type From: Per Jakobsen Injection-Date: Tue, 09 Jul 2019 18:10:45 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56839 Date: 2019-07-09T11:10:45-07:00 List-Id: Right, so even GCC 9.1 chooses to load a constant from memory instead of lo= ading as immediate, 2-3 cycles instead of 1 as well as using additional mem= ory space. I wonder why GCC does not optimize this... It seems like a simpl= e 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-gnatmak= e both version 8.3, and both use the slower load from memory instead of loa= d immediate. I wonder if it is an Ada-specific thing, or a general GCC back-end deficien= cy?...