-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SelectionDAG] Add support to filter SelectionDAG dumps during ISel b…
…y function names (#72696) `-debug-only=isel-dump` is the new debug type for printing SelectionDAG after each ISel phase. This can be furthered filter by `-filter-print-funcs=<function names>`. Note that the existing `-debug-only=isel` will take precedence over the new behavior and print SelectionDAG dumps of every single function regardless of `-filter-print-funcs`'s values.
- Loading branch information
1 parent
a1e2c65
commit 0e24179
Showing
5 changed files
with
119 additions
and
43 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
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
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,33 @@ | ||
; RUN: llc -debug-only=isel-dump -filter-print-funcs=foo < %s 2>&1 | FileCheck %s --check-prefix=FOO | ||
; RUN: llc -debug-only=isel-dump -filter-print-funcs=bar < %s 2>&1 | FileCheck %s --check-prefix=BAR | ||
; RUN: llc -debug-only=isel-dump -filter-print-funcs=foo,zap < %s 2>&1 | FileCheck %s --check-prefixes=FOO,ZAP | ||
; Make sure the original -debug-only=isel still works. | ||
; RUN: llc -debug-only=isel < %s 2>&1 | FileCheck %s --check-prefixes=FOO,BAR,ZAP | ||
; REQUIRES: asserts | ||
|
||
; FOO: === foo | ||
; BAR-NOT: === foo | ||
; ZAP-NOT: === foo | ||
; FOO: # Machine code for function foo | ||
define i32 @foo(i32 %a, i32 %b) { | ||
%r = add i32 %a, %b | ||
ret i32 %r | ||
} | ||
|
||
; BAR: === bar | ||
; FOO-NOT: === bar | ||
; ZAP-NOT: === bar | ||
; BAR: # Machine code for function bar | ||
define i32 @bar(i32 %a, i32 %b) { | ||
%r = mul i32 %a, %b | ||
ret i32 %r | ||
} | ||
|
||
; ZAP: === zap | ||
; FOO-NOT: === zap | ||
; BAR-NOT: === zap | ||
; ZAP: # Machine code for function zap | ||
define i32 @zap(i32 %a, i32 %b) { | ||
%r = sub i32 %a, %b | ||
ret i32 %r | ||
} |