<div dir="ltr">HI Hameeza,<div><br></div><div>what do mean by link is still missing?</div><div><br></div><div>Currently it is not possible to use polyhedral information from within in-tree LLVM passes. This is because Polly is not currently part of the LLVM tree, and is only linked into the tools as an external project. I.e., you can't depend on Polly passes in an in-tree pass. What you can do, though, is use Polly from an out-of-tree context. If you build your pass as a loadable library, you're free to link against Polly and include its headers.</div><div><br></div><div>Cheers,</div><div>Philip</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-28 18:20 GMT+01:00 hameeza ahmed via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have modified the code as follows; now i am using both scopdetection and scopinformation before dependency check but i think link is missing...<div><br></div><div><div>virtual bool runOnFunction(Function &F)</div><div>        {</div><div>         </div><div>std::unique_ptr<ScopInfo> Result;</div><div>std::unique_ptr<ScopDetection> Result2;</div><div>//polly::ScopDetection pl;</div><div><br></div><div>auto &LI = getAnalysis<<wbr>LoopInfoWrapperPass>().<wbr>getLoopInfo();</div><div>  auto &RI = getAnalysis<RegionInfoPass>().<wbr>getRegionInfo();</div><div>  auto &AA = getAnalysis<<wbr>AAResultsWrapperPass>().<wbr>getAAResults();</div><div>  auto &SE = getAnalysis<<wbr>ScalarEvolutionWrapperPass>().<wbr>getSE();</div><div>  auto &DT = getAnalysis<<wbr>DominatorTreeWrapperPass>().<wbr>getDomTree();</div><div>  Result2.reset(new ScopDetection(F, DT, SE, LI, RI, AA));</div><div><br></div><div><br></div><div><br></div><div> auto &SD2 = getAnalysis<polly::<wbr>ScopDetectionWrapperPass>().<wbr>getSD();</div><div><br></div><div><br></div><div><br></div><div>  auto &SE2 = getAnalysis<<wbr>ScalarEvolutionWrapperPass>().<wbr>getSE();</div><div>  auto &LI2 = getAnalysis<<wbr>LoopInfoWrapperPass>().<wbr>getLoopInfo();</div><div>  auto &AA2 = getAnalysis<<wbr>AAResultsWrapperPass>().<wbr>getAAResults();</div><div>  auto const &DL2 = F.getParent()->getDataLayout()<wbr>;</div><div>  auto &DT2 = getAnalysis<<wbr>DominatorTreeWrapperPass>().<wbr>getDomTree();</div><div>  auto &AC2 = getAnalysis<<wbr>AssumptionCacheTracker>().<wbr>getAssumptionCache(F);</div><div><br></div><div>  Result.reset(new ScopInfo{DL2, SD2, SE2, LI2, AA2, DT2, AC2});</div><span class=""><div><br></div><div> </div><div>polly::<wbr>DependenceInfoWrapperPass dp;</div><div><br></div><div>auto &SI = *getAnalysis<polly::<wbr>ScopInfoWrapperPass>().getSI()<wbr>;</div><div><br></div><div>  for (auto &It : SI) {</div><div>    assert(It.second && "Invalid SCoP object!");</div><div>    dp.recomputeDependences(It.<wbr>second.get(), polly::Dependences::AL_Access)<wbr>;</div><div><br></div><div><br></div><div><br></div><div>}</div><div><br></div><div><br></div><div> </div></span><div>return false;</div><div>        }</div></div><div><br></div><div><br></div><div>what to do? please help.....</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 28, 2018 at 8:30 PM, hameeza ahmed <span dir="ltr"><<a href="mailto:hahmed2305@gmail.com" target="_blank">hahmed2305@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I need to analyze dependencies in my llvm ir by using polly. i created a new pass called mypass there i added polly dependency analysis pass but when i execute this pass in gdb i get no data.</div><div><br></div><div>Why is that so?</div><div><br></div><div>My code is follows;</div><div><br></div><div><br></div><div><br></div><div><div>namespace {</div><div>struct mypass : public FunctionPass {</div><div>static char ID;</div><div><br></div><div>mypass() : FunctionPass(ID) {</div><div>}</div><div> virtual bool runOnFunction(Function &F)</div><div>        {</div><div><div>polly::DependenceInfoWrapperPa<wbr>ss dp;</div><div><br></div><div>auto &SI = *getAnalysis<polly::ScopInfoWr<wbr>apperPass>().getSI();</div><div><br></div><div>  for (auto &It : SI) {</div><div>    assert(It.second && "Invalid SCoP object!");</div><div>    dp.recomputeDependences(It.sec<wbr>ond.get(), polly::Dependences::AL_Access)<wbr>; }</div></div></div><div><div>virtual void getAnalysisUsage(AnalysisUsage &AU) const</div><div>        {</div></div><div><br></div><div>  AU.addRequiredTransitive<polly<wbr>::ScopInfoWrapperPass>();</div><div><div> AU.setPreservesAll();</div><div>        }</div><div>};</div><div>}</div><div>char mypass::ID = 0;</div><div>static RegisterPass<mypass> X("mypass", "mypass World Pass", false, false);</div><div><br></div></div><div>please help. i have been trying a lot. </div></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>