[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: Use more logtest in cse.scm
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/02: Use more logtest in cse.scm |
Date: |
Sun, 3 Oct 2021 15:46:00 -0400 (EDT) |
wingo pushed a commit to branch main
in repository guile.
commit 71e201d5c4fd10c4bd9abbbc68b8971e8201ac7f
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Sun Oct 3 21:09:41 2021 +0200
Use more logtest in cse.scm
* module/language/cps/effects-analysis.scm (causes-effect?):
(effect-clobbers?): Use logtest.
---
module/language/cps/effects-analysis.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/module/language/cps/effects-analysis.scm
b/module/language/cps/effects-analysis.scm
index 365c280..9ee7f0c 100644
--- a/module/language/cps/effects-analysis.scm
+++ b/module/language/cps/effects-analysis.scm
@@ -221,7 +221,7 @@
(logior &all-effect-kinds (&object &unknown-memory-kinds))))
(define-inlinable (causes-effect? x effects)
- (not (zero? (logand x effects))))
+ (logtest x effects))
(define-inlinable (causes-all-effects? x)
(eqv? x &all-effects))
@@ -238,8 +238,8 @@ is or might be a read or a write to the same location as A."
;; A negative field indicates "the whole object".
;; Non-negative fields indicate only part of the object.
(or (< a 0) (< b 0) (= a b))))))
- (and (not (zero? (logand a &write)))
- (not (zero? (logand b (logior &read &write))))
+ (and (logtest a &write)
+ (logtest b (logior &read &write))
(locations-same?)))
(define (compute-clobber-map effects)