[llvm-dev] Is DependenceAnalysisWrapperPass IsCFGOnlyPass 'true' correct?

Mendell, Mark P via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 3 11:00:16 PDT 2017


DependenceAnalysisWrapperPass  is marked as IsCFGOnlyPass true.  Unfortunately, it requires ScalarEvolutionWrapperPass, which is not a cfg only pass (IsCFGOnlyPass false).  This means that the pass manager may remove the ScalarEvolutionWrapperPass, but leave DependenceAnalysisWrapperPass  as preserved, if a transform is marked as setPreservedCFG().  This will then cause PMTopLevelManager::setLastUser to fail, when the next pass requires DependenceAnalysisWrapperPass. Since DependenceAnalysisWrapperPass  is still available, the assumption is that the required analyses are still available.

In any case, the dependence analysis can change even if the CFG is preserved (i.e. changing a GEP).  A transform that doesn't change the CFG should reasonably expect to call setPreservedCFG().  I think that it should be marked as not CFG only.

Comments?

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171003/3d7b9888/attachment.html>


More information about the llvm-dev mailing list