Commit c6d72a1b authored by wlott's avatar wlott
Browse files

Added support for the new alignment slot in SCs. Check-ok-target will

only indicate that the target is okay if the alignment is okay, and
select-location will only select a location that is aligned correctly.
parent 0073c0e0
......@@ -772,7 +772,8 @@
(or (eq (sb-kind target-sb) :unbounded)
(member loc (sc-locations sc)))
(= (sc-element-size target-sc) (sc-element-size sc))
(not (conflicts-in-sc tn sc loc)))
(not (conflicts-in-sc tn sc loc))
(zerop (mod loc (sc-alignment sc))))
......@@ -840,9 +841,10 @@
(declare (type tn tn) (type sc sc) (inline member))
(let* ((sb (sc-sb sc))
(element-size (sc-element-size sc))
(alignment (sc-alignment sc))
(size (finite-sb-current-size sb))
(start-offset (finite-sb-last-offset sb)))
(let ((current-start start-offset)
(let ((current-start (* (ceiling start-offset alignment) alignment))
(wrap-p nil))
(declare (type index current-start))
......@@ -859,9 +861,10 @@
(return-from select-location current-start))
(let ((offset (+ current-start i)))
(when (offset-conflicts-in-sb tn sb offset)
(setq current-start (1+ offset))
(setq current-start
(* (ceiling (1+ offset) alignment) alignment))
(incf current-start))))))
(incf current-start alignment))))))
;;;; Load TN packing:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment