<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 7/10/13 3:43 PM, Cristianno Martins
wrote:<br>
</div>
<blockquote
cite="mid:CAPjL5AcM0OnhGhVgXkWL1H_Nqp9hAf6qQPs7JsbPWskQ0tD6Hw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">Hello John,
<div><br>
</div>
<div>What opt command line arguments are you using?</div>
</div>
</blockquote>
<br>
I'm not using opt. I'm manually scheduling a pipline within a
tool. The code looks like this:<br>
<br>
PassManager pm;<br>
MyAlias * aa = new MyAlias();<br>
pm.add(aa);<br>
pm.add(new MyAliasUsingPass());<br>
<br>
Both MyAlias and MyAliasUsingPass are now ModulePass'es. MyAlias is
an alias analysis pass while MyAliasUsingPass is a pass that
requires an alias analysis and performs a test query.<br>
<br>
The output of -debug-pass=Structure is the following:<br>
<br>
No Alias Analysis (always returns 'may' alias)<br>
ModulePass Manager<br>
MyAlias<br>
MyAliasUsingPass<br>
<br>
<br>
I've changed MyAlias to call abort() when it is queried, but the
program never crashes when running MyAliasUsingPass, which indicates
that my MyAlias is never being used for queries.<br>
<br>
I've also tried making MyAlias an ImmutablePass, but that didn't
appear to work either.<br>
<br>
<blockquote
cite="mid:CAPjL5AcM0OnhGhVgXkWL1H_Nqp9hAf6qQPs7JsbPWskQ0tD6Hw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>If you follow <a moz-do-not-send="true"
href="http://llvm.org/docs/Passes.html#no-aa-no-alias-analysis-always-returns-may-alias"
target="_blank">this link</a>, you can see that -no-aa is
the default alias analysis implementation if you do not
manually specify which AA passes you want to use. Note that
you can pass as many different implementations of AA as you
want, and each of them will be chained together for each
function, like a pipeline, if the previous one was not able to
determine if there is a dependence or not.</div>
</div>
</blockquote>
<br>
Yes, I am aware of how analysis groups are *supposed* to work. :)
I'm just not getting the advertised functionality and am at a loss
as to what I could be doing wrong.<br>
<br>
-- John T.<br>
<br>
<blockquote
cite="mid:CAPjL5AcM0OnhGhVgXkWL1H_Nqp9hAf6qQPs7JsbPWskQ0tD6Hw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Hope this help,</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div><br>
--<br>
Cristianno Martins<br>
PhD Student of Computer Science<br>
University of Campinas<br>
<a moz-do-not-send="true" href="mailto:cmartins@ic.unicamp.br"
target="_blank">cmartins@ic.unicamp.br</a><br>
</div>
<br>
<br>
<div class="gmail_quote">On Wed, Jul 10, 2013 at 1:24 PM, John
Criswell <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear All,<br>
<br>
I'm trying to add a new alias analysis to the alias analysis
group in LLVM 3.2. This new pass is linked statically into
a tool that lives outside the LLVM source tree, so I'm
trying to avoid making patches to the LLVM sources.<br>
<br>
I've added the INITIALIZE_AG_PASS_BEGIN() and
INITIALIZE_AG_PASS_END() code to the pass, manually
scheduled it before the MemoryDependenceAnalysis pass, and
have tried making it a FunctionPass and an ImmutablePass,
but no matter what I do, it seems like
MemoryDependenceAnalysis and other passes keep using the
-no-aa default pass instead.<br>
<br>
1) Does anyone have ideas on how to verify that my pass is
part of the alias analysis group?<br>
<br>
2) Does anyone have any ideas on what I might be doing
wrong?<br>
<br>
Any ideas would be appreciated.<br>
<br>
Thanks in advance,<br>
<br>
-- John T.<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu"
target="_blank">LLVMdev@cs.uiuc.edu</a> <a
moz-do-not-send="true" href="http://llvm.cs.uiuc.edu"
target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev"
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>