[LLVMdev] PassManager error message hard to decipher

Aqeel Mahesri mahesri at cs.uiuc.edu
Sun Dec 1 20:41:01 PST 2002


I cannot figure out a particular PassManager error for what seem to be
legal dependencies.

Here is the situation.  We have 5 passes, RegisterAllocator,
FunctionLiveVarInfo, CoalesceCopies, DominanceForest, and UnionSSAVars,
with dependencies as follows:

class RegisterAllocator : public FunctionPass {
  . . .
  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
	AU.addRequired<FunctionLiveVarInfo>();
	AU.addRequired<CoalesceCopies>();
  }
  . . .
};

class FunctionLiveVarInfo : public FunctionPass {
  . . .
  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
	AU.setPreservesAll();
  }
  . . .
};

class CoalesceCopies : public FunctionPass {
  . . .
  virtual void getAnalysisUsage(AnalysisUsage &AU) {
	AU.setPreservesAll();
	AU.addRequired<FunctionLiveVarInfo>();
	AU.addRequired<UnionSSAVars>();
	AU.addRequired<DominanceForest>();
  }
  . . .
};

class UnionSSAVars : public FunctionPass {
  . . .
  virtual void getAnalysisUsage(AnalysisUsage &AU) {
        AU.setPreservesAll();
	AU.addRequired<FunctionLiveVarInfo>();
  }
  . . .
};

class DominanceForest : public FunctionPass {
  . . .
  virtual void getAnalysisUsage(AnalysisUsage &AU) {
        AU.setPreservesAll();
	AU.addRequired<DominatorTree>();
	AU.addRequired<UnionSSAVars>();
  }
  . . .
};

When llc is run (invoking RegisterAllocator), it gives this error message:

Assertion failed: 0 && "Pass available but not found! " "Perhaps this is a
module pass requiring a function pass?", file PassManagerT.h, line 395
Abort

None of the passes here is or requires a module pass.  What does the error
message mean, then?

Aqeel Mahesri




More information about the llvm-dev mailing list