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
ef3babb5
Commit
ef3babb5
authored
13 years ago
by
Jayke Meijer
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:taddeus/peephole
parents
772c1458
e755a9f6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
report/report.tex
+11
-4
11 additions, 4 deletions
report/report.tex
with
11 additions
and
4 deletions
report/report.tex
+
11
−
4
View file @
ef3babb5
...
...
@@ -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
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
is not possible. See the example for a more clear explanation of constant
folding(will come). In other words until the current definition of
\texttt
{
x
}
becomes dead. Therefore reaching definitions analysis is needed.
is not possible. See
\ref
{
opt
}
for an example. In other words until the current
definition of
\texttt
{
x
}
becomes dead. Therefore reaching definitions analysis is
needed. Reaching definitions is a form of liveness analysis, we use the liveness
analysis within a block and not between blocks.
\subsubsection*
{
Copy propagation
}
...
...
@@ -305,7 +306,13 @@ addu $regC, $regB, 4 move $regC, $regD
# 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
move
$
regA,
$
regB move
$
regA,
$
regB
...
...
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