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
31e9202c
Commit
31e9202c
authored
Dec 30, 2011
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
worked on report constant folding part
parent
9525cbe1
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 @
31e9202c
...
...
@@ -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
...
...
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