Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Optimizing compiler
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Data-flow optimizations === [[Dataflow|Data-flow]] optimizations, based on [[data-flow analysis]], primarily depend on how certain properties of data are propagated by control edges in the [[control-flow graph]]. Some of these include: ;[[Common subexpression elimination]]: In the expression <code>(a + b) - (a + b)/4</code>, "common subexpression" refers to the duplicated <code>(a + b)</code>. Compilers implementing this technique realize that <code>(a + b)</code> will not change, and so only calculate its value once.<ref name="aho-sethi-ullman" />{{rp|pages=592β594}} ;[[Constant folding|Constant folding and propagation]]: Replacing expressions consisting of constants (e.g., <code>3 + 5</code>) with their final value (<code>8</code>) at compile time, rather than doing the calculation in run-time.<ref name="MuchnickAssociates1997">{{cite book|author1=Muchnick|first=Steven|url=https://archive.org/details/advancedcompiler00much|title=Advanced Compiler Design Implementation|author2=Muchnick and Associates|date=15 August 1997|publisher=Morgan Kaufmann|isbn=978-1-55860-320-2|pages=[https://archive.org/details/advancedcompiler00much/page/329 329]β|quote=constant folding.|url-access=registration}}</ref> Used in most modern languages. ;[[Induction variable recognition and elimination]]: See discussion above about ''induction variable analysis''. ;[[Strict aliasing|Alias classification and pointer analysis]]: In the presence of [[pointer (computer programming)|pointer]]s, it is difficult to make any optimizations at all, since potentially any variable can have been changed when a memory location is assigned to. By specifying which pointers can alias which variables, unrelated pointers can be ignored. ;[[Dead store|Dead-store]] elimination: Removal of assignments to variables that are not subsequently read, either because the lifetime of the variable ends or because of a subsequent assignment that will overwrite the first value.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Optimizing compiler
(section)
Add topic