Skip to content

Commit 264c087

Browse files
committed
remove print
1 parent 9895428 commit 264c087

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

llvm/include/llvm/CodeGen/MachineCycleAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class MachineCycleInfoPrinterPass
6565
explicit MachineCycleInfoPrinterPass(raw_ostream &OS) : OS(OS) {}
6666
PreservedAnalyses run(MachineFunction &MF,
6767
MachineFunctionAnalysisManager &MFAM);
68-
bool isRequired() { return true; }
68+
static bool isRequired() { return true; }
6969
};
7070

7171
} // end namespace llvm

llvm/lib/CodeGen/MachineCycleAnalysis.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ bool MachineCycleInfoPrinterLegacy::runOnMachineFunction(MachineFunction &F) {
104104
PreservedAnalyses
105105
MachineCycleInfoPrinterPass::run(MachineFunction &MF,
106106
MachineFunctionAnalysisManager &MFAM) {
107-
OS << "MachineCycleInfo for function: " << MF.getName() << '\n';
108-
109107
auto &MCI = MFAM.getResult<MachineCycleAnalysis>(MF);
110108
MCI.print(OS);
111109
return PreservedAnalyses::all();

llvm/test/CodeGen/X86/cycle-info.mir

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# RUN: llc -mtriple=x86_64-unknown-linux-gnu -run-pass=print-machine-cycles -o - %s 2>&1 | FileCheck %s
1+
# RUN: llc -mtriple=x86_64-unknown-linux-gnu -run-pass=print-machine-cycles -o - %s 2>&1 | FileCheck %s --check-prefixes=LEGACY,CHECK
22

3-
# RUN: llc -mtriple=x86_64-unknown-linux-gnu -passes="print<machine-cycles>" -o - %s 2>&1 | FileCheck %s
3+
# RUN: llc -mtriple=x86_64-unknown-linux-gnu -passes="machine-function(print,print<machine-cycles>)" -o - %s 2>&1 | FileCheck %s --check-prefixes=NPM,CHECK
44

55
...
66
---
7-
# CHECK-LABEL: MachineCycleInfo for function: empty
7+
# LEGACY-LABEL: MachineCycleInfo for function: empty
8+
# NPM-LABEL: name: empty
89
name: empty
910
alignment: 16
1011
tracksRegLiveness: true
@@ -17,7 +18,8 @@ body: |
1718
1819
...
1920
---
20-
# CHECK-LABEL: MachineCycleInfo for function: simple
21+
# LEGACY-LABEL: MachineCycleInfo for function: simple
22+
# NPM-LABEL: name: simple
2123
# CHECK: depth=1: entries(bb.1)
2224
name: simple
2325
alignment: 16
@@ -42,7 +44,8 @@ body: |
4244
4345
...
4446
---
45-
# CHECK-LABEL: MachineCycleInfo for function: two_latches
47+
# LEGACY-LABEL: MachineCycleInfo for function: two_latches
48+
# NPM-LABEL: name: two_latches
4649
# CHECK: depth=1: entries(bb.1) bb.2
4750
name: two_latches
4851
alignment: 16
@@ -74,7 +77,8 @@ body: |
7477
7578
...
7679
---
77-
# CHECK-LABEL: MachineCycleInfo for function: nested_simple
80+
# LEGACY-LABEL: MachineCycleInfo for function: nested_simple
81+
# NPM-LABEL: name: nested_simple
7882
# CHECK: depth=1: entries(bb.1) bb.3 bb.2
7983
# CHECK: depth=2: entries(bb.2)
8084
name: nested_simple
@@ -110,7 +114,8 @@ body: |
110114
111115
...
112116
---
113-
# CHECK-LABEL: MachineCycleInfo for function: nested_outer_latch_in_inner_loop
117+
# LEGACY-LABEL: MachineCycleInfo for function: nested_outer_latch_in_inner_loop
118+
# NPM-LABEL: name: nested_outer_latch_in_inner_loop
114119
# CHECK: depth=1: entries(bb.1) bb.2 bb.3
115120
# CHECK: depth=2: entries(bb.2) bb.3
116121
name: nested_outer_latch_in_inner_loop
@@ -146,7 +151,8 @@ body: |
146151
147152
...
148153
---
149-
# CHECK-LABEL: MachineCycleInfo for function: sibling_loops
154+
# LEGACY-LABEL: MachineCycleInfo for function: sibling_loops
155+
# NPM-LABEL: name: sibling_loops
150156
# CHECK: depth=1: entries(bb.1)
151157
# CHECK: depth=1: entries(bb.2)
152158
name: sibling_loops
@@ -183,7 +189,8 @@ body: |
183189
184190
...
185191
---
186-
# CHECK-LABEL: MachineCycleInfo for function: serial_loops
192+
# LEGACY-LABEL: MachineCycleInfo for function: serial_loops
193+
# NPM-LABEL: name: serial_loops
187194
# CHECK: depth=1: entries(bb.2)
188195
# CHECK: depth=1: entries(bb.1)
189196
name: serial_loops
@@ -216,7 +223,8 @@ body: |
216223
217224
...
218225
---
219-
# CHECK-LABEL: MachineCycleInfo for function: nested_sibling_loops
226+
# LEGACY-LABEL: MachineCycleInfo for function: nested_sibling_loops
227+
# NPM-LABEL: name: nested_sibling_loops
220228
# CHECK: depth=1: entries(bb.1) bb.4 bb.5 bb.3 bb.2
221229
# CHECK: depth=2: entries(bb.4) bb.5
222230
# CHECK: depth=2: entries(bb.2)
@@ -279,7 +287,8 @@ body: |
279287
280288
...
281289
---
282-
# CHECK-LABEL: MachineCycleInfo for function: deeper_nest
290+
# LEGACY-LABEL: MachineCycleInfo for function: deeper_nest
291+
# NPM-LABEL: name: deeper_nest
283292
# CHECK: depth=1: entries(bb.1) bb.5 bb.2 bb.3 bb.4
284293
# CHECK: depth=2: entries(bb.2) bb.3 bb.4
285294
# CHECK: depth=3: entries(bb.3) bb.4
@@ -326,7 +335,8 @@ body: |
326335
327336
...
328337
---
329-
# CHECK-LABEL: MachineCycleInfo for function: irreducible_basic
338+
# LEGACY-LABEL: MachineCycleInfo for function: irreducible_basic
339+
# NPM-LABEL: name: irreducible_basic
330340
# CHECK: depth=1: entries(bb.2 bb.1)
331341
name: irreducible_basic
332342
alignment: 16
@@ -362,7 +372,8 @@ body: |
362372
363373
...
364374
---
365-
# CHECK-LABEL: MachineCycleInfo for function: irreducible_mess
375+
# LEGACY-LABEL: MachineCycleInfo for function: irreducible_mess
376+
# NPM-LABEL: name: irreducible_mess
366377
# CHECK: depth=1: entries(bb.2 bb.1) bb.6 bb.5 bb.3 bb.4
367378
# CHECK: depth=2: entries(bb.5 bb.3 bb.1) bb.4
368379
# CHECK: depth=3: entries(bb.3 bb.1) bb.4
@@ -438,7 +449,8 @@ body: |
438449
439450
...
440451
---
441-
# CHECK-LABEL: MachineCycleInfo for function: irreducible_into_simple_cycle
452+
# LEGACY-LABEL: MachineCycleInfo for function: irreducible_into_simple_cycle
453+
# NPM-LABEL: name: irreducible_into_simple_cycle
442454
# CHECK: depth=1: entries(bb.2 bb.7 bb.4) bb.6 bb.5 bb.3
443455
name: irreducible_into_simple_cycle
444456
alignment: 16
@@ -497,7 +509,8 @@ body: |
497509
498510
...
499511
---
500-
# CHECK-LABEL: MachineCycleInfo for function: irreducible_mountain_bug
512+
# LEGACY-LABEL: MachineCycleInfo for function: irreducible_mountain_bug
513+
# NPM-LABEL: name: irreducible_mountain_bug
501514
# CHECK: depth=1: entries(bb.6) bb.11 bb.10 bb.8 bb.7 bb.9 bb.12
502515
# CHECK: depth=2: entries(bb.10 bb.7) bb.8 bb.9
503516
# CHECK: depth=3: entries(bb.8 bb.7) bb.9

0 commit comments

Comments
 (0)