]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.gvn.avail: use ?infimum
authorAlexander Iljin <ajsoft@yandex.ru>
Thu, 22 Jun 2017 10:49:01 +0000 (13:49 +0300)
committerBjörn Lindqvist <bjourne@gmail.com>
Mon, 26 Jun 2017 22:39:53 +0000 (00:39 +0200)
extra/compiler/cfg/gvn/avail/avail.factor

index 768850df8b3c5470f3b320ba9b30e776bb471078..906646281cff2ade93ed94bc06380c3e5806ec90 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2011 Alex Vondrak.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors assocs hashtables kernel namespaces sequences
-sets
+sequences.extras sets
 compiler.cfg
 compiler.cfg.dataflow-analysis
 compiler.cfg.def-use
@@ -24,12 +24,9 @@ M: avail transfer-set drop defined assoc-union ;
 
 : available? ( vn -- ? ) basic-block get avail-in key? ;
 
-: best-vreg ( available-vregs -- vreg )
-    [ f ] [ infimum ] if-empty ;
-
 : >avail-vreg ( vreg -- vreg/f )
     final-iteration? get [
-        congruence-class [ available? ] filter best-vreg
+        congruence-class [ available? ] filter ?infimum
     ] when ;
 
 : available-uses? ( insn -- ? )