Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Commit [d7b75c] Maximize Restore History

compiler/sparc/subprim: Clean up a FIXME in LENGTH/LIST.

* There's a longstanding FIXME in this code, due to it using two
type tests each time through the loop, even though one can only
ever trigger on the first iteration, and due to PPC being the only
other backend that does so.

* Actually, it's worse than that: That type test that can only
trigger on the first iteration? It can't, thanks to the VOP
:ARG-TYPES parameter... Well, unless someone gets really careless
with their low-SAFETY code.

* First, change the out-of-line error trap to use PTR rather
than OBJ. Means the debugger can't always point out a variable at
fault, but also means that we only need the one error trap. And,
as mentioned above, it'd take someone doing something broken at
low SAFETY for it to matter anyway.

* Second, kill the inline error trap and its type test.

* Third, do a partial unroll and loop rotation, putting the exit
test at the end so that we can do fall-through exit, and
duplicating it at the beginning so that we don't need to jump into
the middle of the loop body.

* And the entire approach, with the exception of the use of
branch-delay slots, can also be done on PPC... But not in this
commit.

Alastair Bridgewater Alastair Bridgewater 2014-03-17

changed src/compiler/sparc/subprim.lisp
src/compiler/sparc/subprim.lisp Diff Switch to side-by-side view
Loading...