[llvm] [SPIR-V] Replace assert with report_fatal (PR #118617)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 04:21:11 PST 2024


VyacheslavLevytskyy wrote:

I'm not quite sure I understand the logics. We are looking into an optional step, that is an attempt to sort basic blocks. My expectation would be that it never fails, because it's an optional step that not of applications require or even ask for.

I think the correct way to deal with any case where this method doesn't work is to return without changing anything and pass info about the fail of sortBlocks() to the later stage, so that only those of applications which require this step are free to fail with diagnostics kind of "No valid candidate in the queue. Is the graph reducible?"

@s-perron What do you think about the case?

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


More information about the llvm-commits mailing list