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
7b952e86
Commit
7b952e86
authored
Dec 30, 2011
by
Jayke Meijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added section on dead code elimination to report.
parent
c2e864a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
report/report.tex
report/report.tex
+13
-0
No files found.
report/report.tex
View file @
7b952e86
...
@@ -180,6 +180,19 @@ This code shows that \texttt{\$regA} is replaced with \texttt{\$regB}. This
...
@@ -180,6 +180,19 @@ This code shows that \texttt{\$regA} is replaced with \texttt{\$regB}. This
way, the move instruction might have become useless, and it will then be
way, the move instruction might have become useless, and it will then be
removed by the dead code elimination.
removed by the dead code elimination.
\subsection
{
Dead code elimination
}
The final optimization that is performed is dead code elimination. This means
that when an instruction is executed, but the result is never used, that
instruction can be removed.
To be able to properly perform dead code elimination, we need to know whether a
variable will be used, before it is overwritten again. If it does, we call the
variable live, otherwise the variable is dead. The technique to find out if a
variable is live is called liveness analysis. We implemented this for the
entire code, by analyzing each block, and using the variables that come in the
block live as the variables that exit its predecessor live.
\section
{
Implementation
}
\section
{
Implementation
}
We decided to implement the optimization in Python. We chose this programming
We decided to implement the optimization in Python. We chose this programming
...
...
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