-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MachineFunctionPass] Support -print-changed={,c}diff{,-quiet}
Follow-up to D130434. Move doSystemDiff to PrintPasses.cpp and call it in MachineFunctionPass.cpp. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D130833
- Loading branch information
Showing
6 changed files
with
142 additions
and
76 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
33 changes: 33 additions & 0 deletions
33
llvm/test/Other/ChangePrinters/print-changed-diff-machine.ll
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 @@ | ||
; REQUIRES: aarch64-registered-target | ||
; RUN: llc -filetype=null -mtriple=aarch64 -O0 -print-changed=diff %s 2>&1 | FileCheck %s --check-prefixes=DIFF,VERBOSE | ||
; RUN: llc -filetype=null -mtriple=aarch64 -O0 -print-changed=diff-quiet %s 2>&1 | FileCheck %s --check-prefixes=DIFF,QUIET | ||
; RUN: llc -filetype=null -mtriple=aarch64 -O0 -print-changed=cdiff %s 2>&1 | FileCheck %s --check-prefixes=CDIFF,VERBOSE | ||
; RUN: llc -filetype=null -mtriple=aarch64 -O0 -print-changed=cdiff-quiet %s 2>&1 | FileCheck %s --check-prefixes=CDIFF,QUIET | ||
|
||
; VERBOSE: *** IR Dump After AArch64O0PreLegalizerCombiner on foo omitted because no change *** | ||
; QUIET-NOT: *** {{.*}} omitted because no change *** | ||
|
||
; DIFF: *** IR Dump After Legalizer (legalizer) on foo *** | ||
; DIFF-NEXT: -# Machine code for function foo: IsSSA, TracksLiveness | ||
; DIFF-NEXT: +# Machine code for function foo: IsSSA, TracksLiveness, Legalized | ||
; DIFF-NEXT: Function Live Ins: $w0 | ||
|
||
; CDIFF: *** IR Dump After Legalizer (legalizer) on foo *** | ||
; CDIFF-NEXT: {{.\[31m-}}# Machine code for function foo: IsSSA, TracksLiveness{{.\[0m}} | ||
; CDIFF-NEXT: {{.\[32m\+}}# Machine code for function foo: IsSSA, TracksLiveness, Legalized{{.\[0m}} | ||
|
||
@var = global i32 0 | ||
|
||
define void @foo(i32 %a) { | ||
entry: | ||
%b = add i32 %a, 1 | ||
store i32 %b, ptr @var | ||
ret void | ||
} | ||
|
||
define void @bar(i32 %a) { | ||
entry: | ||
%b = add i32 %a, 2 | ||
store i32 %b, ptr @var | ||
ret void | ||
} |
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