Aliasing on bitcode.

Dear All,

I am working on a LLVM bitcode based project in which we do static lockset analysis. I need to get Aliasing information statically given the .bc file of the application. Is there any library in LLVM which already implements the aliasing? (does it support multi-threaded apps?) What is the best way of doing it (I want to extract aliasing information in runOnModule() function in the pass I am working on)?

Thanks a lot,
::Saman Zonouz
UIUC PhD CS student

I am working on a LLVM bitcode based project in which we do static lockset
analysis. I need to get Aliasing information statically given the .bc file
of the application. Is there any library in LLVM which already implements
the aliasing?

There's an alias analysis interface that comes standard with LLVM; see
include/llvm/Analysis/AliasAnalysis.h. The standard alias analysis
pass isn't particularly powerful, though.

(does it support multi-threaded apps?)

I'm not quite sure how alias analysis would be affected by whether an
app is multi-threaded...

What is the best way of
doing it (I want to extract aliasing information in runOnModule() function
in the pass I am working on)?

See http://llvm.org/docs/WritingAnLLVMPass.html#interaction .
Something like "AU.addRequired<AliasAnalysis>()" in the
getAnalysisUsage method of your pass plus a call to
"getAnalysis<AliasAnalysis>()" in runOnModule will do the trick.

-Eli

Thanks a lot! As far as I understood AliasSetTrack is a list of AliasSets each of which is a list of pointers, is it right?
Is AliasSet the set of pointers that may/must alias eachother? if so, why are some of the AliasSets empty?

Thanks a lot,
::Saman