forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MachineVerifier] Report errors from one thread at a time (llvm#111605)
Create the `ReportedErrors` class to track the number of reported errors during verification. The class will block reporting errors if some other thread is currently reporting an error. I've encountered a case where there were many different verifications reporting errors at the same time on different threads. This ensures that we don't start printing the error from one case until we are completely done printing errors from other cases. Most of the time `AbortOnError = true` so we usually abort after reporting the first error. Depends on llvm#111602.
- Loading branch information
Showing
2 changed files
with
92 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: not --crash llc -mtriple=aarch64 -o /dev/null -run-pass=none %s 2>&1 | FileCheck %s --implicit-check-not="Bad machine code" | ||
# REQUIRES: aarch64-registered-target | ||
|
||
# Since we abort after reporting the first error, we should only expect one error to be reported. | ||
# CHECK: *** Bad machine code: Generic virtual register use cannot be undef *** | ||
# CHECK: Found 1 machine code errors. | ||
|
||
--- | ||
name: foo | ||
liveins: | ||
body: | | ||
bb.0: | ||
$x0 = COPY undef %0:_(s64) | ||
... | ||
|
||
--- | ||
name: bar | ||
liveins: | ||
body: | | ||
bb.0: | ||
$x0 = COPY undef %0:_(s64) | ||
... |