[LLVMdev] Aliasing on bitcode.

saman aliari samy_442 at yahoo.com
Tue Jul 14 09:40:08 PDT 2009

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,

From: Eli Friedman <eli.friedman at gmail.com>
To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
Sent: Tuesday, July 14, 2009 1:03:24 AM
Subject: Re: [LLVMdev] Aliasing on bitcode.

On Mon, Jul 13, 2009 at 3:28 PM, saman aliari<samy_442 at yahoo.com> wrote:
> 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.

LLVM Developers mailing list
LLVMdev at cs.uiuc.edu        http://llvm.cs.uiuc.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090714/85c39ded/attachment.html>

More information about the llvm-dev mailing list