1
0

Small fixes
All checks were successful
/ Build pdf (push) Successful in 29s

This commit is contained in:
Matthias Veigel 2025-07-13 21:00:46 +02:00
parent 9516f12a3e
commit 13c76fe59b
Signed by: root
GPG Key ID: 2437494E09F13876

View File

@ -81,15 +81,14 @@
// cSpell:enable // cSpell:enable
= Abstract = Abstract
Dataflow analysis is an important part of compiler optimization since it allows to eliminate or rewrite parts of the code with various techniques such as: constant propagation, dead code elimination, branch elimination. This work aims to look at the advantages and disadvantages of using dataflow analysis, how it is already used in current compilers, on which programming languages or immediate representations it operates and what limitations still exist. \ Dataflow analysis is an important part of compiler optimization, as it enables the elimination or rewriting of code through various techniques such as constant propagation, dead code elimination, and branch elimination. This work aims to look at the advantages and disadvantages of using dataflow analysis, how it is already used in current compilers, on which programming languages or immediate representations it operates and what limitations still exist. \
For this purpose we conducted a systematic literature in which we analyze 15 publications selected from 571 entries. Finally, following conclusions were drawn: dataflow analysis is used in many of todays popular compilers and the field is actively being researched. The advantages of dataflow analysis are huge for performance gain, but its implementations are complex and you need to be careful that the implementation does not change the program in an unwanted way. For this purpose we conducted a systematic literature in which we analyze 15 publications selected from 571 entries. Finally, following conclusions were drawn: dataflow analysis is used in many of todays popular compilers and the field is actively being researched. The advantages of dataflow analysis are huge for performance gain, but its implementations are complex and you need to be careful that the implementation does not change the program in an unwanted way.
= Introduction = Introduction
Program performance remains a large concern in modern computing and programming, since it has a direct impact on user and developer experience. As software is becoming more complex, manual optimization is increasingly complex and harder for developers to implement. Program performance remains a major concern in modern computing and programming, as it directly impacts both user and developer experience. Manual optimization has always difficult for developers, but with increasingly complex software it is becoming even harder. Moreover, large codebases spread across many files make it hard to maintain an overview and implement optimizations. For these reasons, automatic optimization by compilers is necessary. \
Another problem with this increasing complexity is that large codebases are spread out over more files, which also makes it harder for developers to keep an overview and to implement optimizations. Because of these reasons automatic optimization is needed in compilers. \
The technique dataflow analysis is used to gather information about the state of variables throughout the flow of the program. It plays an important role in many compilers, since by analyzing how, where and what variables are assigned and how these variables are used, many complex optimizations, which require context from the surrounding code, can be implemented. \ The technique dataflow analysis is used to gather information about the state of variables throughout the flow of the program. It plays an important role in many compilers, since by analyzing how, where and what variables are assigned and how these variables are used, many complex optimizations, which require context from the surrounding code, can be implemented. \
Dataflow analysis is a well-established field where regularly new techniques are created and older techniques improved. Different compilers and analysis framework implement different methods and optimizations with dataflow analysis. This work aims to summarize the current state and past achievements of this technology. \ Dataflow analysis is a well-established field where regularly new techniques are created and older techniques improved. Different compilers and analysis framework implement different methods and optimizations with dataflow analysis. This work aims to summarize the current state and past achievements of this technology. \
While this paper talks about dataflow analysis in the context of compiler optimization, these techniques can also be used to create either more detailed or previously not possible compilation warnings and errors. For example: with dataflow analysis writes to an invalid memory location or usage of a not initialized object or variable can be detected at compile time, which leads to a better coding experience and less crashes at runtime. Examples for this are the Clang Static Analyzer #footnote[https://clang.llvm.org/docs/ClangStaticAnalyzer.html] and the static analysis options of GCC #footnote[https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html]. \ While this paper focuses on dataflow analysis in the context of compiler optimization, these techniques can also enhance static analysis tools. For instance, writes to invalid memory locations or the use of uninitialized objects or variables can be detected at compile time, leading to improved developer experience and fewer runtime crashes. Examples include the Clang Static Analyzer #footnote[https://clang.llvm.org/docs/ClangStaticAnalyzer.html] and the static analysis features of GCC #footnote[https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html]. \
This work is divided into the following sections: in @background_c the background required to understand this work is given, in @methodology_c the methodology used to create this work is described, in @findings_c the contents of the papers are analyzed and evaluated, in @conclusion_c the results from this work are summarized. This work is divided into the following sections: in @background_c the background required to understand this work is given, in @methodology_c the methodology used to create this work is described, in @findings_c the contents of the papers are analyzed and evaluated, in @conclusion_c the results from this work are summarized.
= Background <background_c> = Background <background_c>