[llvm] [DomTree] Provide a way to query if DFSInfo is valid (PR #91251)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 13:42:42 PDT 2024


hiraditya wrote:

> > how do i know DFSIn number is valid calling updateDFSNumbers?
> 
> `if (!DT.isDFSInfoValid()) DT.updateDFSNumbers()` is exactly the same as `DT.updateDFSNumbers()`. So I can't see why it would matter... unless you need to do some other bookkeeping to discard the invalid DFS numbers?
> 
> And as I noted on the other review, calling `DT.updateDFSNumbers()` after processing every basic block has extremely bad performance characteristics in edge cases.

makes sense. i should be able make it work without this API.

https://github.com/llvm/llvm-project/pull/91251


More information about the llvm-commits mailing list