[llvm] [Analysis] Visit orphan Functions in CGPassManager catch-up loop (PR #194219)
Janek van Oirschot via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 04:55:10 PDT 2026
================
----------------
JanekvO wrote:
> Could you explain what you mean with this being a setup for further problems? afaik, this will prevent such cases. But I clearly don't know the entirety of the architecture. What would the cases be where iterating over dead code would be problematic in this pass in your opinion and how could it cause bugs?
I meant 'problem' not so much in potential crashes or bugs but more so on (interface) expectation: I can imagine somebody needing to use the scc_iterator over an arbitrary graph datastructure they made/need and seeing the function name `getUnvisitedNodes` and thinking: "Hey, I haven't run over any nodes yet so this is totally what I need!", without knowing that they'd have to go through the "regular" iterator.
> I'm sorry, I don't understand what you mean with this. Would you care to explain?
Again, this is a nit so more of a 'take it with a grain of salt' review comment; however: if I'm new to llvm and reading up on implementation here and there, and I were to read the comment `This function is only meant to be used after the full iterator has been run from beginning to end.` my first question would be 'so the full iterator doesn't run over the full graph?'. The suggestion of full is that nothing more is to be done which contradicts what this function tries to do, imo
https://github.com/llvm/llvm-project/pull/194219
More information about the llvm-commits
mailing list