Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
peephole
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
peephole
Commits
469a6f8f
Commit
469a6f8f
authored
Dec 28, 2011
by
Jayke Meijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed faulty function call in init of optimize module
parent
b279082a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
benchmarks/optimized/.gitignore
benchmarks/optimized/.gitignore
+1
-0
benchmarks/optimized/acron.s
benchmarks/optimized/acron.s
+1
-2
src/optimize/__init__.py
src/optimize/__init__.py
+4
-3
No files found.
benchmarks/optimized/.gitignore
0 → 100644
View file @
469a6f8f
*.s
benchmarks/optimized/acron.s
View file @
469a6f8f
...
@@ -180,7 +180,6 @@ $L5:
...
@@ -180,7 +180,6 @@ $L5:
addu
$
3
,
$
16
,
$
17
addu
$
3
,
$
16
,
$
17
addu
$
2
,
$
3
,
$
2
addu
$
2
,
$
3
,
$
2
sw
$
2
,
24
(
$fp
)
sw
$
2
,
24
(
$fp
)
lw
$
2
,
24
(
$fp
)
beq
$
2
,
$
0
,
$L8
beq
$
2
,
$
0
,
$L8
lw
$
2
,
24
(
$fp
)
lw
$
2
,
24
(
$fp
)
li
$
3
,
0x00000003
#
3
li
$
3
,
0x00000003
#
3
...
...
src/optimize/__init__.py
View file @
469a6f8f
...
@@ -3,7 +3,7 @@ from src.dataflow import find_basic_blocks
...
@@ -3,7 +3,7 @@ from src.dataflow import find_basic_blocks
from
redundancies
import
remove_redundant_jumps
,
move_1
,
move_2
,
move_3
,
\
from
redundancies
import
remove_redundant_jumps
,
move_1
,
move_2
,
move_3
,
\
move_4
,
load
,
shift
,
add
move_4
,
load
,
shift
,
add
from
advanced
import
eliminate_common_subexpressions
,
fold_constants
,
\
from
advanced
import
eliminate_common_subexpressions
,
fold_constants
,
\
copy_propagation
copy_propagation
,
algebraic_transformations
def
remove_redundancies
(
block
):
def
remove_redundancies
(
block
):
...
@@ -31,7 +31,8 @@ def optimize_block(block):
...
@@ -31,7 +31,8 @@ def optimize_block(block):
while
remove_redundancies
(
block
)
\
while
remove_redundancies
(
block
)
\
|
eliminate_common_subexpressions
(
block
)
\
|
eliminate_common_subexpressions
(
block
)
\
|
fold_constants
(
block
)
\
|
fold_constants
(
block
)
\
|
copy_propagation
(
block
):
|
copy_propagation
(
block
)
\
|
algebraic_transformations
(
block
):
pass
pass
...
@@ -40,7 +41,7 @@ def optimize(statements, verbose=0):
...
@@ -40,7 +41,7 @@ def optimize(statements, verbose=0):
optimization functions."""
optimization functions."""
# Optimize on a global level
# Optimize on a global level
o
=
len
(
statements
)
o
=
len
(
statements
)
optimize_global
(
statements
)
remove_redundant_jumps
(
statements
)
g
=
len
(
statements
)
g
=
len
(
statements
)
# Optimize basic blocks
# Optimize basic blocks
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment