[LLVMdev] Loop Info Stability
David Greene
dag at cray.com
Wed Aug 27 11:00:49 PDT 2008
I have an analysis pass which uses Scalar Evolution information. My pass
implements getAnalysisUsage as:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AU.addRequiredTransitive<LoopInfo>();
AU.addRequiredTransitive<ScalarEvolution>();
AU.addRequiredTransitive<TargetData>();
}
However, I am seeing cases where I'm getting bogus Loop data. That is,
the Loop object seems to be corrupted (empty block lists, etc.).
At first my pass was a LoopPass because I really only care about the
analysis within loops. But I thought maybe that's not really correct so I
made it a FunctionPass. No go, I still see the same issue.
The corruption happens during the running of the analysis itself.
Is there something tricky about the way LoopInfo or SCEV is preserved/not
preserved?
-Dave
More information about the llvm-dev
mailing list