Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
peephole
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Taddeüs Kroes
peephole
Commits
42be1bbf
Commit
42be1bbf
authored
13 years ago
by
Jayke Meijer
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:taddeus/peephole
parents
2bcdcaff
28ab0e8f
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
src/optimize.py
+6
-6
6 additions, 6 deletions
src/optimize.py
with
6 additions
and
6 deletions
src/optimize.py
+
6
−
6
View file @
42be1bbf
...
...
@@ -14,10 +14,10 @@ if __name__ == '__main__':
# Parse File
statements
=
parse_file
(
argv
[
1
])
st_original
=
len
(
statements
)
# Optimize on a global level
statements
=
optimize_global
(
statements
)
st_aft_global
=
len
(
statements
)
# Create basic blocks
...
...
@@ -28,11 +28,11 @@ if __name__ == '__main__':
# Rewrite to assembly
out
=
write_statements
(
statements
)
print
"
Optimization:
"
print
"
Original statements:
"
+
str
(
st_original
)
print
"
After global optimization:
"
+
str
(
st_aft_global
)
print
"
After basic blocks optimization:
"
+
str
(
len
(
statements
)
)
print
"
Original statements:
"
,
st_original
print
"
After global optimization:
"
,
st_aft_global
print
"
After basic blocks optimization:
"
,
len
(
statements
)
if
len
(
argv
)
>
2
:
# Save output assembly
...
...
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