[llvm-dev] Polly Dependency Analysis in MyPass

hameeza ahmed via llvm-dev llvm-dev at lists.llvm.org
Sun Jan 28 07:30:11 PST 2018


Hello,

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.

Why is that so?

My code is follows;



namespace {
struct mypass : public FunctionPass {
static char ID;

mypass() : FunctionPass(ID) {
}
 virtual bool runOnFunction(Function &F)
        {
polly::DependenceInfoWrapperPass dp;

auto &SI = *getAnalysis<polly::ScopInfoWrapperPass>().getSI();

  for (auto &It : SI) {
    assert(It.second && "Invalid SCoP object!");
    dp.recomputeDependences(It.second.get(),
polly::Dependences::AL_Access); }
virtual void getAnalysisUsage(AnalysisUsage &AU) const
        {

  AU.addRequiredTransitive<polly::ScopInfoWrapperPass>();
 AU.setPreservesAll();
        }
};
}
char mypass::ID = 0;
static RegisterPass<mypass> X("mypass", "mypass World Pass", false, false);

please help. i have been trying a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180128/4e71cfeb/attachment.html>


More information about the llvm-dev mailing list