[LLVMdev] Alias Analysis Changes
Chris Lattner
sabre at nondot.org
Tue Mar 4 13:55:01 PST 2003
I just wrapped up some fairly major changes to the AliasAnalysis
infrastructure in LLVM, and thought LLVMdev should know about it.
In particular, here are the highlights:
1. AliasAnalysis can now take into consideration the size of a memory
access to determine whether or not something aliases. This is crucial
for a field-sensitive analysis to not cause bad transformations to
happen.
2. Mod/Ref information is now a first class part of the AliasAnalysis
interface. The IPModRef class does not yet implement the AliasAnalysis
interface, but it should probably be changed to at some point.
3. A new pair of classes (AliasSetTracker & AliasSet) can be used to build
alias sets for transformations that like to think of things that way.
The LICM pass, for example, is dramatically simplified due to these
classes.
4. There is a new document describing AliasAnalysis related stuff,
available here: http://llvm.cs.uiuc.edu/docs/AliasAnalysis.html
If you are planning on doing anything with Alias Analysis in LLVM, I
would recommend taking a look.
Also, the LICM pass has been enhanced to perform scalar promotion in
addition simple hoisting of load instructions. This is capable of
changing something like this:
for (...)
T->data += ...
into:
tmp = T->data; // tmp is an SSA register
for (...)
tmp += ...
T->data = tmp;
... which stress tests the alias analyses a bit more.
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
More information about the llvm-dev
mailing list