* Re: master 8aef401b4f: LAP optimiser: more stack reduction hoisting
[not found] ` <20230213155859.EC4E9C13915@vcs2.savannah.gnu.org>
@ 2023-02-13 22:54 ` Basil L. Contovounesios
2023-02-14 10:45 ` Mattias Engdegård
2023-02-14 16:29 ` Mattias Engdegård
0 siblings, 2 replies; 4+ messages in thread
From: Basil L. Contovounesios @ 2023-02-13 22:54 UTC (permalink / raw)
To: emacs-devel; +Cc: Mattias Engdegård
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
Mattias Engdegård [2023-02-13 10:58 -0500] wrote:
> branch: master
> commit 8aef401b4f66a64ddfa9390590fb2cae1f96d522
> Author: Mattias Engdegård <mattiase@acm.org>
> Commit: Mattias Engdegård <mattiase@acm.org>
>
> LAP optimiser: more stack reduction hoisting
>
> Hoisting stack reduction ops allows them to coalesce and/or cancel out
> pushing ops, and for useful operations to sink and combine, such as
> not + goto-if-[not-]nil.
>
> * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
> Add the rule
>
> UNARY discardN-preserve-tos --> discardN-preserve-tos UNARY
>
> where UNARY pops and pushes one value.
>
> Generalise the rule
>
> const discardN-preserve-tos --> discardN const
>
> to any 0-ary op, not just const: varref, point, etc.
I suspect the following test is failing as a result of this
(I could bisect only to within ±1 commit):
[-- Attachment #2: map-tests.log --]
[-- Type: text/plain, Size: 1983 bytes --]
-*- mode: compilation; default-directory: "~/.local/src/emacs-nox/" -*-
Compilation started at Mon Feb 13 22:44:45
make TEST_LOAD_EL=no SELECTOR='"elt-gv"' test/map-tests
make -C test map-tests
make[1]: Entering directory '/home/blc/.local/src/emacs-nox/test'
make[2]: Entering directory '/home/blc/.local/src/emacs-nox/test'
GEN lisp/emacs-lisp/map-tests.log
Running 1 tests (2023-02-13 22:44:45+0000, selector `"elt-gv"')
Test test-map-elt-gv backtrace:
signal(ert-test-failed (((should (map-empty-p map)) :form (map-empty
ert-fail(((should (map-empty-p map)) :form (map-empty-p ((wrong-type
#f(compiled-function () #<bytecode -0x143b65cabf1e21ab>)()
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name test-map-elt-gv :documentation "Test
ert-run-or-rerun-test(#s(ert--stats :selector "elt-gv" :tests [#s(er
ert-run-tests("elt-gv" #f(compiled-function (event-type &rest event-
ert-run-tests-batch("elt-gv")
ert-run-tests-batch-and-exit("elt-gv")
eval((ert-run-tests-batch-and-exit '"elt-gv") t)
command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/emacs-lisp/map-tests
command-line()
normal-top-level()
Test test-map-elt-gv condition:
(ert-test-failed
((should
(map-empty-p map))
:form
(map-empty-p
((wrong-type-argument number-or-marker-p nil)))
:value nil))
FAILED 1/1 test-map-elt-gv (0.001755 sec) at lisp/emacs-lisp/map-tests.el:119
Ran 1 tests, 0 results as expected, 1 unexpected (2023-02-13 22:44:45+0000, 0.068526 sec)
1 unexpected results:
FAILED test-map-elt-gv
make[2]: *** [Makefile:174: lisp/emacs-lisp/map-tests.log] Error 1
make[2]: Leaving directory '/home/blc/.local/src/emacs-nox/test'
make[1]: *** [Makefile:240: lisp/emacs-lisp/map-tests] Error 2
make[1]: Leaving directory '/home/blc/.local/src/emacs-nox/test'
make: *** [Makefile:1100: test/map-tests] Error 2
Compilation exited abnormally with code 2 at Mon Feb 13 22:44:45
[-- Attachment #3: Type: text/plain, Size: 2915 bytes --]
I don't immediately spot anything wrong with the test
(but then I wrote it :).
Could you (or someone else) please have a look?
Thanks,
--
Basil
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu) of 2023-02-13 built
on tia
Repository revision: b950b46f514989442fdd9937a0e96d53a3affa88
Repository branch: wt/master-nox
System Description: Debian GNU/Linux bookworm/sid
Configured using:
'configure 'CFLAGS=-O2 -march=native' -C --prefix=/home/blc/.local
--program-suffix=-nox --enable-checking=structs
--with-file-notification=yes --with-x-toolkit=no --without-x'
Configured features:
ACL DBUS GMP GNUTLS GPM JSON LCMS2 LIBSELINUX LIBSYSTEMD LIBXML2 MODULES
NOTIFY INOTIFY PDUMPER SECCOMP SOUND SQLITE3 THREADS TREE_SITTER XIM
ZLIB
Important settings:
value of $LANG: en_IE.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow regexp-opt sort mail-extr emacsbug message mailcap yank-media
puny dired dnd dired-loaddefs rfc822 mml mml-sec password-cache epa
derived epg rfc6068 epg-config gnus-util text-property-search time-date
subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils term/xterm xterm byte-opt gv
bytecomp byte-compile rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 47621 6434)
(symbols 48 5735 0)
(strings 32 15012 1635)
(string-bytes 1 434358)
(vectors 16 8412)
(vector-slots 8 104194 7244)
(floats 8 24 44)
(intervals 56 200 10)
(buffers 984 10))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 8aef401b4f: LAP optimiser: more stack reduction hoisting
2023-02-13 22:54 ` master 8aef401b4f: LAP optimiser: more stack reduction hoisting Basil L. Contovounesios
@ 2023-02-14 10:45 ` Mattias Engdegård
2023-02-14 16:29 ` Mattias Engdegård
1 sibling, 0 replies; 4+ messages in thread
From: Mattias Engdegård @ 2023-02-14 10:45 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: emacs-devel
13 feb. 2023 kl. 23.54 skrev Basil L. Contovounesios <contovob@tcd.ie>:
> I suspect the following test is failing as a result of this
So do I, thank you very much Basil! Will leave no stone unturned.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 8aef401b4f: LAP optimiser: more stack reduction hoisting
2023-02-13 22:54 ` master 8aef401b4f: LAP optimiser: more stack reduction hoisting Basil L. Contovounesios
2023-02-14 10:45 ` Mattias Engdegård
@ 2023-02-14 16:29 ` Mattias Engdegård
2023-02-14 18:30 ` Basil Contovounesios
1 sibling, 1 reply; 4+ messages in thread
From: Mattias Engdegård @ 2023-02-14 16:29 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: emacs-devel
13 feb. 2023 kl. 23.54 skrev Basil L. Contovounesios <contovob@tcd.ie>:
> I don't immediately spot anything wrong with the test
Indeed, this was a somewhat roundabout LAP peephole bug, triggered by the change you found by bisection but actually caused by a botched refactoring a bit earlier, and ultimately by much older code. It should be fixed now.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 8aef401b4f: LAP optimiser: more stack reduction hoisting
2023-02-14 16:29 ` Mattias Engdegård
@ 2023-02-14 18:30 ` Basil Contovounesios
0 siblings, 0 replies; 4+ messages in thread
From: Basil Contovounesios @ 2023-02-14 18:30 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: emacs-devel
Mattias Engdegård [2023-02-14 17:29 +0100] wrote:
> 13 feb. 2023 kl. 23.54 skrev Basil L. Contovounesios <contovob@tcd.ie>:
>
>> I don't immediately spot anything wrong with the test
>
> Indeed, this was a somewhat roundabout LAP peephole bug, triggered by the change
> you found by bisection but actually caused by a botched refactoring a bit
> earlier, and ultimately by much older code. It should be fixed now.
Great, thanks!
--
Basil
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-14 18:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <167630393968.3716.18264966967495324218@vcs2.savannah.gnu.org>
[not found] ` <20230213155859.EC4E9C13915@vcs2.savannah.gnu.org>
2023-02-13 22:54 ` master 8aef401b4f: LAP optimiser: more stack reduction hoisting Basil L. Contovounesios
2023-02-14 10:45 ` Mattias Engdegård
2023-02-14 16:29 ` Mattias Engdegård
2023-02-14 18:30 ` Basil Contovounesios
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.