GNU bug report logs - #62537
Error compiling emacs master with native compilation activated

Previous Next

Package: emacs;

Reported by: Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>

Date: Thu, 30 Mar 2023 07:20:02 UTC

Severity: normal

Merged with 62481, 62596, 62644, 62655

Found in versions 29.0.60, 30.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 62537 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Mattias EngdegÄrd <mattiase <at> acm.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 62537 <at> debbugs.gnu.org,
 Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>
Subject: Re: bug#62537: Error compiling emacs master with native compilation
 activated
Date: Wed, 05 Apr 2023 21:12:09 +0000
Mattias EngdegÄrd <mattiase <at> acm.org> writes:

> 5 apr. 2023 kl. 19.19 skrev Andrea Corallo <akrl <at> sdf.org>:
>
>> As we suspected was a bug in the native compiler limplification pass
>> triggered by the new LAP emitted.
>> 
>> fa669c4b17c fixes bootstrap --with-native-compilation=aot here and adds
>> a test, is now pushed to master.  In 29 the bug never showed up
>> (probably because the new LAP tweak is not it) so I guess it's better to
>> leave the code as it is.
>
> Nice! So the bug was that we optimised away switches where all jump targets are the same, without considering the fall-through case?

Hi Mattias,
yep that's correct :)

> (Perhaps we should do something like that in the LAP optimiser. Wonder how common the opportunity is though.)

Yeah might be a good idea even if I don't know how common this condition
is.  (We might count how many times `comp-jump-table-optimizable' returns
t in an aot build tho to get an idea).

> By the way, the bulk of `comp-jump-table-optimizable` should be equivalent to something like
>
>    (apply #'= (hash-table-values jmp-table))
>
> which is arguably clearer and definitely shorter.

True but with the downside that it conses.  I'll think about if I want
to change it, thanks for the neat suggestion tho :)

Best Regards

  Andrea




This bug report was last modified 1 year and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.