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
ef3babb5
Commit
ef3babb5
authored
Dec 30, 2011
by
Jayke Meijer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:taddeus/peephole
parents
772c1458
e755a9f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
report/report.tex
report/report.tex
+11
-4
No files found.
report/report.tex
View file @
ef3babb5
...
@@ -126,9 +126,10 @@ calculated at compile time. If a value x is assigned to a certain value, lets
...
@@ -126,9 +126,10 @@ calculated at compile time. If a value x is assigned to a certain value, lets
say 10, than all next occurences of
\texttt
{
x
}
are replaced by 10 until a
say 10, than all next occurences of
\texttt
{
x
}
are replaced by 10 until a
redefinition of x. Arithmetics in Assembly are always performed between two
redefinition of x. Arithmetics in Assembly are always performed between two
variables or a variable and a constant. If this is not the case the calculation
variables or a variable and a constant. If this is not the case the calculation
is not possible. See the example for a more clear explanation of constant
is not possible. See
\ref
{
opt
}
for an example. In other words until the current
folding(will come). In other words until the current definition of
\texttt
{
x
}
definition of
\texttt
{
x
}
becomes dead. Therefore reaching definitions analysis is
becomes dead. Therefore reaching definitions analysis is needed.
needed. Reaching definitions is a form of liveness analysis, we use the liveness
analysis within a block and not between blocks.
\subsubsection*
{
Copy propagation
}
\subsubsection*
{
Copy propagation
}
...
@@ -305,7 +306,13 @@ addu $regC, $regB, 4 move $regC, $regD
...
@@ -305,7 +306,13 @@ addu $regC, $regB, 4 move $regC, $regD
# Constant folding
# Constant folding
li
$
regA, constA ""
sw
$
regA,
16
(
$
fp) ""
li
$
regA, constB
-
> ""
sw
$
regA, 20(
$
fp
)
""
lw
$
regA, 16(
$
fp
)
""
lw
$
regB, 20(
$
fp
)
""
addu
$
regA,
$
regA,
$
regA
$
li regA,
(
constA
+
constB
)
at compile time
# Copy propagation
# Copy propagation
move
$
regA,
$
regB move
$
regA,
$
regB
move
$
regA,
$
regB move
$
regA,
$
regB
...
...
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