-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llvm-reduce: Improve delta pass flag handling
Verify all the requested passes exist before trying to run any. For long reductions, it was really annoying for it to get halfway through and then I come back later to an incomplete reduction. Also add a new skip-delta-passes flag. Most of the time I want to opt out of specific reductions, rather than run a select few.
- Loading branch information
Showing
2 changed files
with
88 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; RUN: llvm-reduce --delta-passes=attributes --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t | ||
; RUN: FileCheck -check-prefix=RESULT %s < %t | ||
|
||
; RUN: llvm-reduce --delta-passes=instructions,attributes --skip-delta-passes=instructions --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t | ||
; RUN: FileCheck -check-prefix=RESULT %s < %t | ||
|
||
; RUN: not llvm-reduce --skip-delta-passes=foo --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR | ||
|
||
|
||
; CHECK-INTERESTINGNESS: @foo | ||
; RESULT: define void @foo() { | ||
; RESULT-NEXT: store i32 | ||
; RESULT-NEXT: ret void | ||
; RESULT0-NOT: attributes | ||
|
||
; ERROR: unknown pass "foo" | ||
define void @foo() #0 { | ||
store i32 0, ptr null | ||
ret void | ||
} | ||
|
||
attributes #0 = { "arstarstarst" } |
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