From: Alastair B. <lis...@us...> - 2015-02-18 01:53:57
|
The branch "master" has been updated in SBCL: via 76c49b275cf20f11170ac8bb10dcd97ad665aa38 (commit) from 7a588c5be2f4bbdfa015beff702555d873a94f50 (commit) - Log ----------------------------------------------------------------- commit 76c49b275cf20f11170ac8bb10dcd97ad665aa38 Author: Alastair Bridgewater <ala...@gm...> Date: Mon Feb 16 09:33:04 2015 -0500 compiler/stack: Extract ORDERED-LIST-INTERSECTION from ORDER-BLOCK-UVL-SETS. * It's short, it's to the point, and I'm going to need to use it more than once. Extract it as a new function. --- src/compiler/stack.lisp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/compiler/stack.lisp b/src/compiler/stack.lisp index 236438b..1fd72cc 100644 --- a/src/compiler/stack.lisp +++ b/src/compiler/stack.lisp @@ -229,6 +229,11 @@ ;;;; Ordering of live UVL stacks +(defun ordered-list-intersection (ordered-list other-list) + (loop for item in ordered-list + when (memq item other-list) + collect item)) + ;;; Put UVLs on the start/end stacks of BLOCK in the right order. PRED ;;; is a predecessor of BLOCK with already sorted stacks; because all ;;; UVLs being live at the BLOCK start are live in PRED, we just need @@ -237,9 +242,7 @@ (let* ((2block (block-info block)) (pred-end-stack (ir2-block-end-stack (block-info pred))) (start (ir2-block-start-stack 2block)) - (start-stack (loop for lvar in pred-end-stack - when (memq lvar start) - collect lvar)) + (start-stack (ordered-list-intersection pred-end-stack start)) (end (ir2-block-end-stack 2block))) (when *check-consistency* (aver (subsetp start start-stack))) ----------------------------------------------------------------------- hooks/post-receive -- SBCL |