<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 3, 2016 at 12:56 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">silvas added a comment.<br>
<br>
How do you plan to marshal the variadic arguments for analyses with a unified analysis manager for all IRUnit's (w/ dependency tracking)? That seems annoying.<br>
<br>
I should have some code for the unified analysis manager up today hopefully.<br>
<br>
I hear your argument (IIRC we discussed this at a social) about back pointers being somewhat annoying, but the ability to use just a `void*` to represent the information passed to an analysis makes it much easier to have a unified analysis manager.<br></blockquote><div><br></div><div>After thinking about this a bit more, this backpointer aspect actually fits naturally with the dependency management.</div><div>For correctness, if we have an IRUnit that is generated by an analysis (e.g. Loop, LazyCallGraph::SCC), we need to track a dependency so that if the analysis that generates it (LoopInfo, LazyCallGraph respectively) is invalidated, we invalidate the analysis result.</div><div><br></div><div>Therefore, an analysis with Loop as the IRUnitT can always call getCachedResult<LoopAnalysis> and have a guarantee that it is getting the correct LoopInfo object (it is truly an assertion in the code that it is cached and "the right one"). Due to dependency tracking, the LoopInfo object obtained in this way is guaranteed to be the one intended. So there is in fact no need to pass extra arguments to provide a "guaranteed correct" LoopInfo object.</div><div><br></div><div>I'm not sure what other use cases there are for passing extra arguments for analyses, but at least this problem (passing in a "guaranteed correct" LoopInfo/LazyCallGraph object) is naturally handled by the dependency tracking.</div><div><br></div><div>-- Sean Silva</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Note that this issue doesn't apply to transformations since they don't participate in the analysis management.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D21462" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D21462</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>