[llvm] [llvm-exegesis] Use explicit error classes for different snippet crashes (PR #74210)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 00:46:48 PST 2023


boomanaiden154 wrote:

@legrosbuffle This should roughly file the design that you outlined when we met last week (might've missed a minor detail or two, my notes ended up being relatively sparse). Two slight deviations:
* Added a new error class, `SnippetSignal` as the only other error type we need involves dealing with signals, so having a first-class method for dealing with that seems to make sense.

I also switched one failure mode in the subprocess function executor from creating a `SnippetCrash`/new equivalent to `Failure` as the failure modes there do happen in the generated snippet, but they happen during the snippet rather than the user-defined code and thus should be classified as failures within `llvm-exegesis` rather than with the snippet itself. The unknown exit code is borderline and could be considered a snippet failure, but I think leaving it as a failure is fine for now.

Would appreciate a review when you get a chance. Thank you very much for suggesting this design. This is definitely a lot cleaner.

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


More information about the llvm-commits mailing list