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

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 13:34:13 PDT 2024


efriedma-quic 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.

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


More information about the llvm-commits mailing list