Compute same-refs even if lambda-var-compute-same-refs is not set.
Some checks failed
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Windows / build (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Linux qemu / ppc64le (push) Failing after 0s

But do not reoptimize anything. or-eq-transform runs after :ir1-phases
and won't be able to request same-leaf-ref-p information.
This commit is contained in:
Stas Boukarev 2025-01-06 07:37:35 +03:00
parent 3379bafcce
commit ff993cf60f
2 changed files with 11 additions and 4 deletions

View file

@ -1196,11 +1196,14 @@
;; constraints for each increment.
(pushnew ref *blocks-to-terminate*))))
;; Find unchanged eql refs to a set variable.
(when (and (lambda-var-sets leaf)
(lambda-var-compute-same-refs leaf))
(when (lambda-var-sets leaf)
(let (mark
(old-mark (ref-same-refs ref))
(eq (lambda-var-eq-constraints leaf))
;; It's cheap to compute but not cheap to reoptimize
;; everything if it's not needed.
;; Some transforms ask for same-leaf-ref-p after :ir1-phases.
(compute (lambda-var-compute-same-refs leaf))
reoptimize)
(when eq
(loop for other-ref in (leaf-refs leaf)
@ -1211,8 +1214,9 @@
(unless mark
(setf mark (list 0))
(setf (ref-same-refs ref) mark))
(unless (and old-mark
(eq old-mark (ref-same-refs other-ref)))
(when (and compute
(not (and old-mark
(eq old-mark (ref-same-refs other-ref)))))
(setf reoptimize t)
(reoptimize-lvar (node-lvar other-ref)))
(setf (ref-same-refs other-ref) mark)))))

View file

@ -2031,5 +2031,8 @@
(#(7FD94 39750D5C 42D83FFB 5F84C345 72E2CBDA EBF09BC1)
"(:ALLOW-OTHER-KEYS :Y-TYPE :X-TYPE :SAME-LEAF-NOT-COMPLEX :INTEGER :COMPLEX-P)"
"( (& (- (>> val 4) (>> val 12)) 7))")
(#(235ED22C 2BCE7F62 611D1FAD 75E7305A 80D0C591 AC841474 D0F360C2 D2F86037)
"(FLOAT RATIONAL REAL LONG-FLOAT DOUBLE-FLOAT SINGLE-FLOAT SHORT-FLOAT *)"
"( (& (- (>> val 11) (>> val 15)) 7))")
)
;; EOF