Alias analysis is a technique by which we get to know whether two pointers point to the same location—that is, whether the same location can be accessed in more ways than one. By getting the results of this analysis, you can decide about further optimizations, such as common subexpression elimination. There are different ways and algorithms to perform alias analysis. In this recipe, we will not deal with these algorithms, but we will see how LLVM provides the infrastructure to write your own alias analysis pass. In this recipe, we will write an alias analysis pass to see how to get started with writing such a pass. We will not make use of any specific algorithm, but will return the MustAlias
response in every case of the analysis.
LLVM Cookbook
LLVM Cookbook
Overview of this book
Table of Contents (16 chapters)
LLVM Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
LLVM Design and Use
Steps in Writing a Frontend
Extending the Frontend and Adding JIT Support
Preparing Optimizations
Implementing Optimizations
Target-independent Code Generator
Optimizing the Machine Code
Writing an LLVM Backend
Using LLVM for Various Useful Projects
Index
Customer Reviews