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

Nick Lewycky nicholas at mxc.ca
Thu Jun 7 11:59:09 PDT 2007

Devang Patel wrote:
> On Jun 7, 2007, at 10:46 AM, Nick Lewycky wrote:
>>Similarly, I pass ETNodes around to functions that don't care about
>>which BB is actually involved, but do need the DFS numbers for  
>>whatever reason.
> In that case what's the use of ETNode ?

The DFS numbers. ETNode is the only way to see what the DFS in and DFS
out numbers are.

At a conceptual level, those numbers uniquely identify the scope and are
used in determining which InequalityGraph properties (also stored
per-ETNode) apply by comparing them for dominance, using the DFS numbers.

Yes we could pass BBs around and modify ETForest to return DFS numbers
from BBs directly, but it would probably be too slow.

> IMO, cost is part of promise "I'm preserving info". We do not want to  
> go in
> the direction of "preserving info partially", which is the case if DFS  
> numbers are
> out of sync at the end of a pass.

Sounds good to me.


More information about the llvm-commits mailing list