[llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp

Nick Lewycky nicholas at mxc.ca
Wed Jun 6 19:19:57 PDT 2007

Predicate simplifier uses this to get the DFS nums for a BB. We also
pass around ETNode*s to avoid having a lot of functions doing BB->ETNode

Similarly with updateDFSNumbers. More than a performance issue, if the
DFS nums aren't up to date predsimplify will crash (and if it didn't
crash it wouldn't work; it needs correct DFS nums). I spoke with Dan
Berlin about it and he says that there's no guarantee that the DFS nums
will be up to date upon entry to a pass, so I call it there.

I'm open to suggestions.


Devang Patel wrote:
> +// FIXME : There is no need to make getNodeForBlock public. Fix
> +// predicate simplifier.
>  ETNode *ETForest::getNodeForBlock(BasicBlock *BB) {
>    ETNode *&BBNode = Nodes[BB];
>    if (BBNode) return BBNode;

More information about the llvm-commits mailing list