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
7bd9e0e8
Commit
7bd9e0e8
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added stuff to also to record the number of bytes attributed to each vop
in each basic block.
parent
e49636e6
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/dyncount.lisp
+39
-12
39 additions, 12 deletions
compiler/dyncount.lisp
with
39 additions
and
12 deletions
compiler/dyncount.lisp
+
39
−
12
View file @
7bd9e0e8
...
@@ -39,15 +39,42 @@
...
@@ -39,15 +39,42 @@
(
let*
((
info
(
ir2-component-dyncount-info
(
component-info
component
)))
(
let*
((
info
(
ir2-component-dyncount-info
(
component-info
component
)))
(
vops
(
dyncount-info-vops
info
)))
(
vops
(
dyncount-info-vops
info
)))
(
do-ir2-blocks
(
block
component
)
(
do-ir2-blocks
(
block
component
)
(
when
(
ir2-block-start-vop
block
)
(
let*
((
start-vop
(
ir2-block-start-vop
block
))
(
let*
((
1block
(
ir2-block-block
block
))
(
1block
(
ir2-block-block
block
))
(
index
(
1-
(
block-number
1block
)))
(
block-number
(
block-number
1block
)))
(
counts
(
svref
vops
index
)))
(
when
(
and
start-vop
block-number
)
(
do
((
vop
(
ir2-block-start-vop
block
)
(
vop-next
vop
)))
(
let*
((
index
(
1-
block-number
))
((
null
vop
))
(
counts
(
svref
vops
index
))
(
let*
((
vop-name
(
vop-info-name
(
vop-info
vop
)))
(
length
(
length
counts
)))
(
entry
(
assoc
vop-name
counts
:test
#'
eq
)))
(
do
((
vop
start-vop
(
vop-next
vop
)))
(
if
entry
((
null
vop
))
(
incf
(
cdr
entry
))
(
let
((
vop-name
(
vop-info-name
(
vop-info
vop
))))
(
setf
counts
(
acons
vop-name
1
counts
)))))
(
do
((
i
0
(
+
i
4
)))
(
setf
(
svref
vops
index
)
counts
))))))
((
or
(
>=
i
length
)
(
eq
(
svref
counts
i
)
vop-name
))
(
when
(
>=
i
length
)
(
incf
length
4
)
(
let
((
new-counts
(
make-array
length
:initial-element
0
)))
(
when
counts
(
replace
new-counts
counts
))
(
setf
counts
new-counts
))
(
setf
(
svref
counts
i
)
vop-name
))
(
incf
(
svref
counts
(
1+
i
)))))))
(
setf
(
svref
vops
index
)
counts
)))))
(
count-instructions
#'
(
lambda
(
vop
bytes
elsewherep
)
(
let
((
block-number
(
block-number
(
ir2-block-block
(
vop-block
vop
)))))
(
when
block-number
(
let*
((
name
(
vop-info-name
(
vop-info
vop
)))
(
counts
(
svref
vops
(
1-
block-number
)))
(
length
(
length
counts
)))
(
do
((
i
0
(
+
i
4
)))
((
>=
i
length
)
(
error
"VOP ~S didn't exist earlier!~% counts=~S"
name
counts
))
(
when
(
eq
(
svref
counts
i
)
name
)
(
incf
(
svref
counts
(
+
i
(
if
elsewherep
3
2
)))
bytes
)
(
return
)))))))
*code-segment*
*elsewhere*
)
(
undefined-value
)))
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