Hi, I wrote a module pass that uses Alias Analysis. For this reason I added AU.addRequired<AliasAnalysis>() to function getAnalysisUsage and used getAnalysis<AliasAnalysis>() in my pass. I tried a few types of alias analyses and I discovered that only alias analyses which are ImmutablePasses are returned using getAnalysis<AliasAnalysis>(). Moreover, when I added both ImmutablePass and FunctionPass, getAnalysis<AliasAnalysis>() returned the ImmutablePass while the FunctionPass did not even appear in the AA chain ( I assume it is because building the chain uses getAnalysis as well). Does this feature should be supported? Thx, Ohad --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121205/4ff971ad/attachment.html>
Hi Ohad,> I wrote a module pass that uses Alias Analysis. > > For this reason I added AU.addRequired<AliasAnalysis>() to function > getAnalysisUsage and used getAnalysis<AliasAnalysis>() in my pass. > > I tried a few types of alias analyses and I discovered that only alias analyses > which are ImmutablePasses are returned using getAnalysis<AliasAnalysis>(). > Moreover, when I added both ImmutablePass and FunctionPass, > getAnalysis<AliasAnalysis>() returned the ImmutablePass while the FunctionPass > did not even appear in the AA chain ( I assume it is because building the chain > uses getAnalysis as well). > > Does this feature should be supported?except for immutable alias analyses you have to schedule the alias analysis pass immediately before your pass otherwise it won't be used. This is an old problem and I'm sure there are some bug reports about it, maybe PR7720? Ciao, Duncan.
Maybe Matching Threads
- [LLVMdev] problem loading analysis results from Inliner pass
- [LLVMdev] Add a new information and preserve it in LLVM
- [LLVMdev] problem loading analysis results from Inliner pass
- [LLVMdev] writing an alias analysis pass?
- [LLVMdev] writing an alias analysis pass?