[LLVMdev] Adding dependency on MemoryDependenceAnalysis pass to LICM causes opt to get stuck in addPass

David Gardner daveg at xmos.com
Thu Dec 15 02:31:55 PST 2011


> > Then I can see that opt is getting stuck in lib/VMCore/PassManager.cpp
> > on the loop at line 672, and just goes round this for as long as I've
> > left it for (several minutes) :
> > 
> >      // Check other pass managers
> >      for (SmallVectorImpl<PMDataManager *>::iterator
> >           I = IndirectPassManagers.begin(),
> >           E = IndirectPassManagers.end(); I != E; ++I)
> >        if (Pass *P = (*I)->findAnalysisPass(AID, false))
> >          return P;
> > 
> 
> Do you see a repeated pattern of pass sequence the pass manager is trying to handle ? P->getPassName() is handy.

I do (looking from llvm::PMTopLevelManager::schedulePass with gdb) :

Breakpoint 1, llvm::PMTopLevelManager::schedulePass (this=0x1310930, P=0x1310510)
    at /home/daveg/tmp/checkouts/llvm/lib/VMCore/PassManager.cpp:609
609       P->preparePassManager(activeStack);
(gdb) display P->getPassName ()
[trimmed output for just pass names]
1: P->getPassName () = 0xf0ba95 "Target Library Information"
1: P->getPassName () = 0xf0b6cd "Target Data Layout"
1: P->getPassName () = 0xef3872 "Basic Alias Analysis (stateless AA
1: P->getPassName () = 0xefffe4 "No Alias Analysis (always returns 'may'
1: P->getPassName () = 0xf35a3a "Print module to stderr"
1: P->getPassName () = 0xed58b0 "Loop Invariant Code Motion"
1: P->getPassName () = 0xf00c95 "Dominator Tree Construction"
1: P->getPassName () = 0xefc441 "Natural Loop Information"
1: P->getPassName () = 0xeeb838 "Canonicalize natural loops"
1: P->getPassName () = 0xefc6e2 "Loop Pass Manager"
1: P->getPassName () = 0xefff64 "Memory Dependence Analysis"
1: P->getPassName () = 0xeeb838 "Canonicalize natural loops"
1: P->getPassName () = 0xefc6e2 "Loop Pass Manager"
1: P->getPassName () = 0xefff64 "Memory Dependence Analysis"

(repeats those 3 from then on)


Removing the `AU.addRequiredID(LoopSimplifyID);' call from the LICM
getAnalysisUsage function allows this to work in this case but I expect
this is required by the pass in general.




        Cheers,

                Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111215/7d5f4809/attachment.sig>


More information about the llvm-dev mailing list