-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Instrumentation] Support MachineFunction in ChangeReporter (#80946)
- Loading branch information
1 parent
75edf0c
commit 026165f
Showing
4 changed files
with
128 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
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
24 changes: 24 additions & 0 deletions
24
llvm/test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.mir
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,24 @@ | ||
# REQUIRES: x86-registered-target | ||
# Simple functionality check. | ||
# RUN: rm -rf %t && mkdir -p %t | ||
# RUN: llc -filetype=null -print-changed=dot-cfg -passes=no-op-machine-function -dot-cfg-dir=%t %s | ||
# RUN: ls %t/*.pdf %t/passes.html | count 3 | ||
|
||
--- | ||
name: g | ||
body: | | ||
bb.0.entry: | ||
%0:gr32 = MOV32ri 5 | ||
$eax = COPY %0 | ||
RET 0, $eax | ||
... | ||
--- | ||
name: f | ||
body: | | ||
bb.0.entry: | ||
%0:gr32 = MOV32ri 7 | ||
$eax = COPY %0 | ||
RET 0, $eax | ||
... |
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,21 @@ | ||
# REQUIRES: x86-registered-target | ||
# RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=null %s \ | ||
# RUN: -p no-op-machine-function -print-changed 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OP | ||
|
||
# RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=null %s \ | ||
# RUN: -p dead-mi-elimination -print-changed 2>&1 | FileCheck %s --check-prefix=CHECK-SIMPLE | ||
|
||
--- | ||
name: test | ||
body: | | ||
bb.0: | ||
%1:gr64 = MOV64ri 0 | ||
%2:gr64 = MOV64ri 0 | ||
$eax = COPY %1 | ||
RET64 implicit $eax | ||
... | ||
|
||
# CHECK-NO-OP: *** IR Dump After NoOpMachineFunctionPass on test omitted because no change *** | ||
|
||
# CHECK-SIMPLE: *** IR Dump After DeadMachineInstructionElimPass on test *** | ||
# CHECK-SIMPLE-NOT: %2:gr64 = MOV64ri 0 |