mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] silly RTL


From: Taylor R Campbell
Subject: [MIT-Scheme-devel] silly RTL
Date: Fri, 13 Aug 2010 03:27:18 +0000
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/9.0.1

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]