While tuning the hash table code, to which I am about to make some
changes (mostly to simplify the code and reduce the size of the
resulting object file, without hurting the performance of hash
tables), I came across this silly fragment of RTL:

(label label-1918)
(assign (register #x3b) (offset (register 4) (machine-constant 0)))
(assign (register 4) (offset-address (register 4) (machine-constant 1)))
(assign (pre-increment (register 4) -1) (register #x3b))
(assign (register #x45) (offset (register 4) (machine-constant 1)))

The original code looked like this:

(let ((hash
       (let loop ()
         (let ((hash ...))
           (if (%record-ref table 9)
               (begin (rehash-table! table) (loop))
               hash)))))
  (let loop ((p (vector-ref (%record-ref table 7) hash)))
    ...))

I wonder whether there's a nice way to make the RTL slightly less
silly, short of reattaching fgopt/param.scm (after making it work, of
course).  At first glance it seems that making it less silly would
require reworking the frame design, though, to which the RTL generator
is slave.

_______________________________________________
MIT-Scheme-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/mit-scheme-devel

Reply via email to