Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
05751ccd
Commit
05751ccd
authored
34 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Changed INIT-SB-VECTORS and GROW-SC to work when a SB has no locations
allocated (initial size of 0).
parent
5a1bab04
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/pack.lisp
+37
-24
37 additions, 24 deletions
compiler/pack.lisp
with
37 additions
and
24 deletions
compiler/pack.lisp
+
37
−
24
View file @
05751ccd
...
...
@@ -146,6 +146,18 @@
(
bit-ior
(
svref
loc-confs
num
)
(
tn-local-conflicts
tn
)
t
))))))))
;;; IR2-BLOCK-COUNT -- Internal
;;;
;;; Return the total number of IR2 blocks in Component.
;;;
(
defun
ir2-block-count
(
component
)
(
declare
(
type
component
component
))
(
1+
(
ir2-block-number
(
block-info
(
block-next
(
component-head
component
))))))
;;; Init-SB-Vectors -- Internal
;;;
;;; Ensure that the conflicts vectors for each :Finite SB are large enough
...
...
@@ -153,31 +165,30 @@
;;; the current size to the initial size.
;;;
(
defun
init-sb-vectors
(
component
)
(
let
((
nblocks
(
1+
(
ir2-block-number
(
block-info
(
block-next
(
component-head
component
)))))))
(
let
((
nblocks
(
ir2-block-count
component
)))
(
dolist
(
sb
*sb-list*
)
(
unless
(
eq
(
sb-kind
sb
)
:non-packed
)
(
let*
((
conflicts
(
finite-sb-conflicts
sb
))
(
always-live
(
finite-sb-always-live
sb
))
(
current-size
(
length
(
svref
conflicts
0
))))
(
when
(
>
nblocks
current-size
)
(
let
((
new-size
(
max
nblocks
(
*
current-size
2
))))
(
dotimes
(
i
(
length
conflicts
))
(
let
((
new-vec
(
make-array
new-size
)))
(
dotimes
(
j
new-size
)
(
setf
(
svref
new-vec
j
)
(
make-array
local-tn-limit
:element-type
'bit
)))
(
setf
(
svref
conflicts
i
)
new-vec
))
(
setf
(
svref
always-live
i
)
(
make-array
new-size
:element-type
'bit
)))))
(
dotimes
(
i
(
length
conflicts
))
(
let
((
conf
(
svref
conflicts
i
)))
(
dotimes
(
j
(
length
conf
))
(
clear-bit-vector
(
svref
conf
j
))))
(
clear-bit-vector
(
svref
always-live
i
))))
(
let
((
conflicts
(
finite-sb-conflicts
sb
))
(
always-live
(
finite-sb-always-live
sb
))
(
max-locs
(
length
conflicts
)))
(
unless
(
zerop
max-locs
)
(
let
((
current-size
(
length
(
svref
conflicts
0
))))
(
when
(
>
nblocks
current-size
)
(
let
((
new-size
(
max
nblocks
(
*
current-size
2
))))
(
dotimes
(
i
(
length
conflicts
))
(
let
((
new-vec
(
make-array
new-size
)))
(
dotimes
(
j
new-size
)
(
setf
(
svref
new-vec
j
)
(
make-array
local-tn-limit
:element-type
'bit
)))
(
setf
(
svref
conflicts
i
)
new-vec
))
(
setf
(
svref
always-live
i
)
(
make-array
new-size
:element-type
'bit
))))))
(
dotimes
(
i
(
length
conflicts
))
(
let
((
conf
(
svref
conflicts
i
)))
(
dotimes
(
j
(
length
conf
))
(
clear-bit-vector
(
svref
conf
j
))))
(
clear-bit-vector
(
svref
always-live
i
)))))
(
setf
(
finite-sb-current-size
sb
)
(
sb-size
sb
))
(
setf
(
finite-sb-last-offset
sb
)
0
)))))
...
...
@@ -196,7 +207,9 @@
(
inc
(
max
(
sb-size
sb
)
(
sc-element-size
sc
)
(
-
needed-size
size
)))
(
new-size
(
+
size
inc
))
(
conflicts
(
finite-sb-conflicts
sb
))
(
block-size
(
length
(
svref
conflicts
0
))))
(
block-size
(
if
(
zerop
(
length
conflicts
))
(
ir2-block-count
*compile-component*
)
(
length
(
svref
conflicts
0
)))))
(
assert
(
eq
(
sb-kind
sb
)
:unbounded
))
(
when
(
>
new-size
(
length
conflicts
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment