* Re: master 52b67740d10: Generalise a LAP optimisation rule [not found] ` <20230325162222.64223C1391B@vcs2.savannah.gnu.org> @ 2023-04-03 17:41 ` Joseph Mingrone 2023-04-03 17:45 ` Eli Zaretskii 2023-04-04 8:10 ` Andrea Corallo 0 siblings, 2 replies; 4+ messages in thread From: Joseph Mingrone @ 2023-04-03 17:41 UTC (permalink / raw) To: emacs-devel; +Cc: Mattias Engdegård, emacs On Sat, 2023-03-25 at 12:22, Mattias EngdegÃ¥rd <mattiase@acm.org> wrote: > branch: master > commit 52b67740d10df8ca539fdc2c7d50283997683141 > Author: Mattias Engdegård <mattiase@acm.org> > Commit: Mattias Engdegård <mattiase@acm.org> > Generalise a LAP optimisation rule > * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): > Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a > rule previously overlooked. This is usually beneficial in code size > and almost always shortens dynamic paths. > --- > lisp/emacs-lisp/byte-opt.el | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el > index 3c7aeb89525..0891ec80beb 100644 > --- a/lisp/emacs-lisp/byte-opt.el > +++ b/lisp/emacs-lisp/byte-opt.el > @@ -2765,7 +2765,9 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." > (or (memq (caar tmp) '(byte-discard byte-discardN)) > ;; Make sure we don't hoist a discardN-preserve-tos > ;; that really should be merged or deleted instead. > - (and (eq (caar tmp) 'byte-discardN-preserve-tos) > + (and (or (eq (caar tmp) 'byte-discardN-preserve-tos) > + (and (eq (caar tmp) 'byte-stack-set) > + (eql (cdar tmp) 1))) > (let ((next (cadr tmp))) > (not (or (memq (car next) > '(byte-discardN-preserve-tos Hello, This commit causes native compilation builds on FreeBSD to fail with the error native-ice ("org/org-plot.el" "block does not end with a branch"... The full error is below and a link to a complete build log (FreeBSD package build) is also included. When the commit is reverted, the build finishes successfully again. Joe -l comp -f batch-byte+native-compile org/org-protocol.el Internal native compiler error: "org/org-plot.el", "block does not end with a branch", #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t) nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil 2) #s(comp-mvar (t) nil nil nil nil 3))) (call record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm #s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) ...) nil nil nil nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data ()) nil nil ...), #<symbol org-plot/gnuplot at 23521> Error: native-ice ("org/org-plot.el" "block does not end with a branch" #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t) nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil 2) #s(comp-mvar (t) nil nil nil nil 3))) (call record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm #s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (call helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm #s(comp-mvar (t) nil nil nil nil 4) plist-get) (set #s(comp-mvar (t) nil nil nil nil 5) #s(comp-mvar (t) nil nil nil nil 0)) (setimm #s(comp-mvar (t) nil nil nil nil 6) :transpose) (set #s(comp-mvar (t) nil nil nil nil 4) (callref funcall #s(comp-mvar (t) nil nil nil nil 4) #s(comp-mvar (t) nil nil nil nil 5) #s(comp-mvar (t) nil nil nil nil 6))) (set #s(comp-mvar (t) nil nil nil nil 5) #s(comp-mvar (t) nil nil nil nil 4)) (setimm #s(comp-mvar (t) nil nil nil nil 6) #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (y 105 yes 105 t 105)))) nil nil nil nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data ()) nil nil 1 72 nil nil) org-plot/gnuplot) mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode 0x1f7c358ad9aed07c>)) debug-early-backtrace() debug-early(error (native-ice "org/org-plot.el" "block does not end with a branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG 83") (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2) make-temp-file) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) "org-plot") (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2) (callref funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (call record_unwind_protect_excursion) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) org-table-to-lisp) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) plist-get) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) (callref funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6) #<hash-table eq 3/3 0x2318babdf>)) :closed nil :in-edges nil :out-edges nil :idom nil :df #<hash-table eql 0/65 0x2264de4ed> :post-num nil :final-frame nil :sp 1 :addr 72 :non-ret-insn nil :no-ret nil) org-plot/gnuplot)) signal(native-ice ("org/org-plot.el" "block does not end with a branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG 83") (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2) make-temp-file) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) "org-plot") (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2) (callref funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (call record_unwind_protect_excursion) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) org-table-to-lisp) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) plist-get) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) (callref funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6) #<hash-table eq 3/3 0x2318babdf>)) :closed nil :in-edges nil :out-edges nil :idom nil :df #<hash-table eql 0/65 0x2264de4ed> :post-num nil :final-frame nil :sp 1 :addr 72 :non-ret-insn nil :no-ret nil) org-plot/gnuplot)) comp--native-compile("org/org-plot.el") batch-native-compile() batch-byte+native-compile() command-line-1(("--eval" "(setq load-prefer-newer t byte-compile-warnings 'all)" "-l" "comp" "-f" "batch-byte+native-compile" "org/org-plot.el")) command-line() normal-top-level() Full FreeBSD package build: http://pkg.ftfl.ca/data/14amd64-default/2023-04-03_09h10m05s/logs/errors/emacs-devel-30.0.50.20230403,3.log ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 52b67740d10: Generalise a LAP optimisation rule 2023-04-03 17:41 ` master 52b67740d10: Generalise a LAP optimisation rule Joseph Mingrone @ 2023-04-03 17:45 ` Eli Zaretskii 2023-04-04 8:10 ` Andrea Corallo 1 sibling, 0 replies; 4+ messages in thread From: Eli Zaretskii @ 2023-04-03 17:45 UTC (permalink / raw) To: Joseph Mingrone; +Cc: emacs-devel, mattiase, emacs > From: Joseph Mingrone <jrm@ftfl.ca> > Cc: Mattias Engdegård <mattiase@acm.org>, emacs@FreeBSD.org > Date: Mon, 03 Apr 2023 14:41:28 -0300 > > On Sat, 2023-03-25 at 12:22, Mattias EngdegÃ¥rd <mattiase@acm.org> wrote: > > > branch: master > > commit 52b67740d10df8ca539fdc2c7d50283997683141 > > Author: Mattias Engdegård <mattiase@acm.org> > > Commit: Mattias Engdegård <mattiase@acm.org> > > > Generalise a LAP optimisation rule > > > * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): > > Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a > > rule previously overlooked. This is usually beneficial in code size > > and almost always shortens dynamic paths. > > --- > > lisp/emacs-lisp/byte-opt.el | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el > > index 3c7aeb89525..0891ec80beb 100644 > > --- a/lisp/emacs-lisp/byte-opt.el > > +++ b/lisp/emacs-lisp/byte-opt.el > > @@ -2765,7 +2765,9 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." > > (or (memq (caar tmp) '(byte-discard byte-discardN)) > > ;; Make sure we don't hoist a discardN-preserve-tos > > ;; that really should be merged or deleted instead. > > - (and (eq (caar tmp) 'byte-discardN-preserve-tos) > > + (and (or (eq (caar tmp) 'byte-discardN-preserve-tos) > > + (and (eq (caar tmp) 'byte-stack-set) > > + (eql (cdar tmp) 1))) > > (let ((next (cadr tmp))) > > (not (or (memq (car next) > > '(byte-discardN-preserve-tos > > Hello, > > This commit causes native compilation builds on FreeBSD to fail with the error > > native-ice ("org/org-plot.el" "block does not end with a branch"... No, that's bug#62481, which is already solved on emacs-29 and the fix should be merged to master soon. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 52b67740d10: Generalise a LAP optimisation rule 2023-04-03 17:41 ` master 52b67740d10: Generalise a LAP optimisation rule Joseph Mingrone 2023-04-03 17:45 ` Eli Zaretskii @ 2023-04-04 8:10 ` Andrea Corallo 2023-04-04 16:13 ` Joseph Mingrone 1 sibling, 1 reply; 4+ messages in thread From: Andrea Corallo @ 2023-04-04 8:10 UTC (permalink / raw) To: Joseph Mingrone; +Cc: emacs-devel, Mattias Engdegård, emacs Joseph Mingrone <jrm@ftfl.ca> writes: > On Sat, 2023-03-25 at 12:22, Mattias EngdegÃ¥rd <mattiase@acm.org> wrote: > >> branch: master >> commit 52b67740d10df8ca539fdc2c7d50283997683141 >> Author: Mattias Engdegård <mattiase@acm.org> >> Commit: Mattias Engdegård <mattiase@acm.org> > >> Generalise a LAP optimisation rule > >> * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): >> Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a >> rule previously overlooked. This is usually beneficial in code size >> and almost always shortens dynamic paths. >> --- >> lisp/emacs-lisp/byte-opt.el | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) > >> diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el >> index 3c7aeb89525..0891ec80beb 100644 >> --- a/lisp/emacs-lisp/byte-opt.el >> +++ b/lisp/emacs-lisp/byte-opt.el >> @@ -2765,7 +2765,9 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." >> (or (memq (caar tmp) '(byte-discard byte-discardN)) >> ;; Make sure we don't hoist a discardN-preserve-tos >> ;; that really should be merged or deleted instead. >> - (and (eq (caar tmp) 'byte-discardN-preserve-tos) >> + (and (or (eq (caar tmp) 'byte-discardN-preserve-tos) >> + (and (eq (caar tmp) 'byte-stack-set) >> + (eql (cdar tmp) 1))) >> (let ((next (cadr tmp))) >> (not (or (memq (car next) >> '(byte-discardN-preserve-tos > > Hello, > > This commit causes native compilation builds on FreeBSD to fail with the error > > native-ice ("org/org-plot.el" "block does not end with a branch"... > > The full error is below and a link to a complete build log (FreeBSD > package build) is also included. > > When the commit is reverted, the build finishes successfully again. > > Joe Hi Joe, thanks for reporting, yes we are tracking this as bug#62537. Best Regards Andrea ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 52b67740d10: Generalise a LAP optimisation rule 2023-04-04 8:10 ` Andrea Corallo @ 2023-04-04 16:13 ` Joseph Mingrone 0 siblings, 0 replies; 4+ messages in thread From: Joseph Mingrone @ 2023-04-04 16:13 UTC (permalink / raw) To: Andrea Corallo; +Cc: emacs-devel, Mattias Engdegård, emacs On Tue, 2023-04-04 at 08:10, Andrea Corallo <akrl@sdf.org> wrote: > Joseph Mingrone <jrm@ftfl.ca> writes: >> On Sat, 2023-03-25 at 12:22, Mattias EngdegÃ¥rd <mattiase@acm.org> wrote: >>> branch: master >>> commit 52b67740d10df8ca539fdc2c7d50283997683141 >>> Author: Mattias Engdegård <mattiase@acm.org> >>> Commit: Mattias Engdegård <mattiase@acm.org> >>> Generalise a LAP optimisation rule >>> * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): >>> Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a >>> rule previously overlooked. This is usually beneficial in code size >>> and almost always shortens dynamic paths. >>> --- >>> lisp/emacs-lisp/byte-opt.el | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el >>> index 3c7aeb89525..0891ec80beb 100644 >>> --- a/lisp/emacs-lisp/byte-opt.el >>> +++ b/lisp/emacs-lisp/byte-opt.el >>> @@ -2765,7 +2765,9 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." >>> (or (memq (caar tmp) '(byte-discard byte-discardN)) >>> ;; Make sure we don't hoist a discardN-preserve-tos >>> ;; that really should be merged or deleted instead. >>> - (and (eq (caar tmp) 'byte-discardN-preserve-tos) >>> + (and (or (eq (caar tmp) 'byte-discardN-preserve-tos) >>> + (and (eq (caar tmp) 'byte-stack-set) >>> + (eql (cdar tmp) 1))) >>> (let ((next (cadr tmp))) >>> (not (or (memq (car next) >>> '(byte-discardN-preserve-tos >> Hello, >> This commit causes native compilation builds on FreeBSD to fail with the error >> native-ice ("org/org-plot.el" "block does not end with a branch"... >> The full error is below and a link to a complete build log (FreeBSD >> package build) is also included. >> When the commit is reverted, the build finishes successfully again. >> Joe > Hi Joe, > thanks for reporting, yes we are tracking this as bug#62537. > Best Regards > Andrea Hi Andrea, Sure and thanks to you and Eli for clarification. Also, apologies for not locating bug#62537 before reporting there. Kind regards, Joe ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-04 16:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <167976134206.19776.1825822435181145052@vcs2.savannah.gnu.org> [not found] ` <20230325162222.64223C1391B@vcs2.savannah.gnu.org> 2023-04-03 17:41 ` master 52b67740d10: Generalise a LAP optimisation rule Joseph Mingrone 2023-04-03 17:45 ` Eli Zaretskii 2023-04-04 8:10 ` Andrea Corallo 2023-04-04 16:13 ` Joseph Mingrone
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).