Skip to content

Commit 1de0535

Browse files
[llvm-mca] Abort on parse error without -skip-unsupported-instructions (#90474)
[llvm-mca] Abort on parse error without -skip-unsupported-instructions Prior to this patch, llvm-mca would continue executing after parse errors. These errors can lead to some confusion since some analysis results are printed on the standard output, and they're printed after the errors, which could otherwise be easy to miss. However it is still useful to be able to continue analysis after errors; so extend the recently added -skip-unsupported-instructions to support this. Two tests which have parse errors for some of the 'RUN' branches are updated to use -skip-unsupported-instructions so they can remain as-is. Add a description of -skip-unsupported-instructions to the llvm-mca command guide, and add it to the llvm-mca --help output: ``` --skip-unsupported-instructions=<value> - Force analysis to continue in the presence of unsupported instructions =none - Exit with an error when an instruction is unsupported for any reason (default) =lack-sched - Skip instructions on input which lack scheduling information =parse-failure - Skip lines on the input which fail to parse for any reason =any - Skip instructions or lines on input which are unsupported for any reason ``` Tests within this patch are intended to cover each of the cases. Reason | Flag | Comment --------------|------|------- none | none | Usual case, existing test suite lack-sched | none | Advises user to use -skip-unsupported-instructions=lack-sched, tested in llvm/test/tools/llvm-mca/X86/BtVer2/unsupported-instruction.s parse-failure | none | Advises user to use -skip-unsupported-instructions=parse-failure, tested in llvm/test/tools/llvm-mca/bad-input.s any | none | (N/A, covered above) lack-sched | any | Continues, prints warnings, tested in llvm/test/tools/llvm-mca/X86/BtVer2/unsupported-instruction.s parse-failure | any | Continues, prints errors, tested in llvm/test/tools/llvm-mca/bad-input.s lack-sched | parse-failure | Advises user to use -skip-unsupported-instructions=lack-sched, tested in llvm/test/tools/llvm-mca/X86/BtVer2/unsupported-instruction.s parse-failure | lack-sched | Advises user to use -skip-unsupported-instructions=parse-failure, tested in llvm/test/tools/llvm-mca/bad-input.s none | * | This would be any test case with skip-unsupported-instructions, coverage added in llvm/test/tools/llvm-mca/X86/BtVer2/simple-test.s any | * | (Logically covered by the other cases)
1 parent f3fbd21 commit 1de0535

13 files changed

+138
-36
lines changed

llvm/docs/CommandGuide/llvm-mca.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,16 @@ option specifies "``-``", then the output will also be sent to standard output.
234234
no extra information, and InstrumentManager never overrides the default
235235
schedule class for a given instruction.
236236

237+
.. option:: -skip-unsupported-instructions=<reason>
238+
239+
Force :program:`llvm-mca` to continue in the presence of instructions which do
240+
not parse or lack key scheduling information. Note that the resulting analysis
241+
is impacted since those unsupported instructions are ignored as-if they are
242+
not supplied as a part of the input.
243+
244+
The choice of `<reason>` controls the when mca will report an error.
245+
`<reason>` may be `none` (default), `lack-sched`, `parse-failure`, `any`.
246+
237247
EXIT STATUS
238248
-----------
239249

llvm/docs/ReleaseNotes.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ Changes to the LLVM tools
223223
(`#89162 <https://github.com/llvm/llvm-project/pull/89162>`_)
224224
``--raw-relr`` has been removed.
225225

226+
* llvm-mca now aborts by default if it is given bad input where previously it
227+
would continue. Additionally, it can now continue when it encounters
228+
instructions which lack scheduling information. The behaviour can be
229+
controlled by the newly introduced
230+
`--skip-unsupported-instructions=<none|lack-sched|parse-failure|any>`, as
231+
documented in `--help` output and the command guide. (`#90474
232+
<https://github.com/llvm/llvm-project/pull/90474>`)
233+
226234
Changes to LLDB
227235
---------------------------------
228236

llvm/test/tools/llvm-mca/AArch64/Exynos/float-divide-multiply.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2-
# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m3 -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,EM3
2+
# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m3 -resource-pressure=false -skip-unsupported-instructions=parse-failure < %s | FileCheck %s -check-prefixes=ALL,EM3
33
# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m4 -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,EM4
44
# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m5 -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,EM5
55

llvm/test/tools/llvm-mca/AArch64/Exynos/float-integer.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2-
# RUN: llvm-mca -mtriple=aarch64-linux-gnu -mcpu=exynos-m3 -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,EM3
2+
# RUN: llvm-mca -mtriple=aarch64-linux-gnu -mcpu=exynos-m3 -resource-pressure=false -skip-unsupported-instructions=parse-failure < %s | FileCheck %s -check-prefixes=ALL,EM3
33
# RUN: llvm-mca -mtriple=aarch64-linux-gnu -mcpu=exynos-m4 -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,EM4
44
# RUN: llvm-mca -mtriple=aarch64-linux-gnu -mcpu=exynos-m5 -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,EM5
55

llvm/test/tools/llvm-mca/ARM/cortex-a57-basic-instructions.s

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
adc pc, r5, r6, ror #2
3434
adc r4, r5, r6, ror #31
3535
adc r6, r7, r8, lsl r9
36-
adc pc, r7, r8, lsl r9
3736
adc r6, r7, r8, lsr r9
3837
adc r6, r7, r8, asr r9
3938
adc r6, r7, r8, ror r9

llvm/test/tools/llvm-mca/ARM/cortex-a57-thumb.s

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@
9595
itett ne
9696
cmpne r7, #243
9797
addeq r7, r1, r2
98+
addne r7, r1, r2
99+
uxthne r7, r7
98100
itttt lt
99101
cmplt r7, #243
100102
uxthlt r7, r1
101103
strhlt r2, [r7, #22]
102104
lsrlt r1, r6, #3
103-
uxthne r7, r7
104105
strh r2, [r7, #22]
105106
asrs r1, r6, #7
106107
lsrs r1, r6, #31
@@ -253,7 +254,7 @@
253254
ldrd r0, r1, [r2, #-0]!
254255
ldrd r0, r1, [r2, #0]!
255256
ldrd r0, r1, [r2, #-0]
256-
ldrd r1, r1, [r0], #0
257+
ldrd r1, r2, [r0], #0
257258
ldrex r1, [r4]
258259
ldrex r8, [r4]
259260
ldrex r2, [sp, #128]
@@ -648,7 +649,7 @@
648649
str r10, [r11], #0
649650
strd r1, r1, [r0], #0
650651
strd r6, r3, [r5], #-8
651-
strd r8, r5, [r5], #-0
652+
strd r8, r5, [r6], #-0
652653
strd r7, r4, [r5], #-4
653654
strd r0, r1, [r2, #-0]!
654655
strd r0, r1, [r2, #0]!
@@ -1010,6 +1011,13 @@
10101011
# CHECK-NEXT: 0 0 0.00 U itett ne
10111012
# CHECK-NEXT: 1 1 0.50 cmpne r7, #243
10121013
# CHECK-NEXT: 1 1 0.50 addeq r7, r1, r2
1014+
# CHECK-NEXT: 1 1 0.50 addne r7, r1, r2
1015+
# CHECK-NEXT: 1 1 0.50 uxthne r7, r7
1016+
# CHECK-NEXT: 0 0 0.00 U itttt lt
1017+
# CHECK-NEXT: 1 1 0.50 cmplt r7, #243
1018+
# CHECK-NEXT: 1 1 0.50 uxthlt r7, r1
1019+
# CHECK-NEXT: 1 1 1.00 * strhlt r2, [r7, #22]
1020+
# CHECK-NEXT: 1 1 0.50 lsrlt r1, r6, #3
10131021
# CHECK-NEXT: 1 1 1.00 * strh r2, [r7, #22]
10141022
# CHECK-NEXT: 1 2 1.00 asrs r1, r6, #7
10151023
# CHECK-NEXT: 1 2 1.00 lsrs r1, r6, #31
@@ -1162,6 +1170,7 @@
11621170
# CHECK-NEXT: 4 4 2.00 * ldrd r0, r1, [r2, #-0]!
11631171
# CHECK-NEXT: 4 4 2.00 * ldrd r0, r1, [r2, #0]!
11641172
# CHECK-NEXT: 2 4 2.00 * ldrd r0, r1, [r2, #-0]
1173+
# CHECK-NEXT: 4 4 2.00 * ldrd r1, r2, [r0], #0
11651174
# CHECK-NEXT: 0 0 0.00 * * U ldrex r1, [r4]
11661175
# CHECK-NEXT: 0 0 0.00 * * U ldrex r8, [r4]
11671176
# CHECK-NEXT: 0 0 0.00 * * U ldrex r2, [sp, #128]
@@ -1556,6 +1565,7 @@
15561565
# CHECK-NEXT: 2 1 1.00 * str r10, [r11], #0
15571566
# CHECK-NEXT: 2 1 1.00 * strd r1, r1, [r0], #0
15581567
# CHECK-NEXT: 2 1 1.00 * strd r6, r3, [r5], #-8
1568+
# CHECK-NEXT: 2 1 1.00 * strd r8, r5, [r6], #-0
15591569
# CHECK-NEXT: 2 1 1.00 * strd r7, r4, [r5], #-4
15601570
# CHECK-NEXT: 2 1 1.00 * strd r0, r1, [r2, #-0]!
15611571
# CHECK-NEXT: 2 1 1.00 * strd r0, r1, [r2, #0]!
@@ -1827,7 +1837,7 @@
18271837

18281838
# CHECK: Resource pressure per iteration:
18291839
# CHECK-NEXT: [0] [1.0] [1.1] [2] [3] [4] [5] [6]
1830-
# CHECK-NEXT: 12.00 164.00 164.00 221.00 313.00 44.00 - -
1840+
# CHECK-NEXT: 12.00 168.00 168.00 223.00 313.00 46.00 - -
18311841

18321842
# CHECK: Resource pressure by instruction:
18331843
# CHECK-NEXT: [0] [1.0] [1.1] [2] [3] [4] [5] [6] Instructions:
@@ -1924,6 +1934,13 @@
19241934
# CHECK-NEXT: - - - - - - - - itett ne
19251935
# CHECK-NEXT: - 0.50 0.50 - - - - - cmpne r7, #243
19261936
# CHECK-NEXT: - 0.50 0.50 - - - - - addeq r7, r1, r2
1937+
# CHECK-NEXT: - 0.50 0.50 - - - - - addne r7, r1, r2
1938+
# CHECK-NEXT: - 0.50 0.50 - - - - - uxthne r7, r7
1939+
# CHECK-NEXT: - - - - - - - - itttt lt
1940+
# CHECK-NEXT: - 0.50 0.50 - - - - - cmplt r7, #243
1941+
# CHECK-NEXT: - 0.50 0.50 - - - - - uxthlt r7, r1
1942+
# CHECK-NEXT: - - - - - 1.00 - - strhlt r2, [r7, #22]
1943+
# CHECK-NEXT: - 0.50 0.50 - - - - - lsrlt r1, r6, #3
19271944
# CHECK-NEXT: - - - - - 1.00 - - strh r2, [r7, #22]
19281945
# CHECK-NEXT: - - - - 1.00 - - - asrs r1, r6, #7
19291946
# CHECK-NEXT: - - - - 1.00 - - - lsrs r1, r6, #31
@@ -2076,6 +2093,7 @@
20762093
# CHECK-NEXT: - 1.00 1.00 2.00 - - - - ldrd r0, r1, [r2, #-0]!
20772094
# CHECK-NEXT: - 1.00 1.00 2.00 - - - - ldrd r0, r1, [r2, #0]!
20782095
# CHECK-NEXT: - - - 2.00 - - - - ldrd r0, r1, [r2, #-0]
2096+
# CHECK-NEXT: - 1.00 1.00 2.00 - - - - ldrd r1, r2, [r0], #0
20792097
# CHECK-NEXT: - - - - - - - - ldrex r1, [r4]
20802098
# CHECK-NEXT: - - - - - - - - ldrex r8, [r4]
20812099
# CHECK-NEXT: - - - - - - - - ldrex r2, [sp, #128]
@@ -2470,6 +2488,7 @@
24702488
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - str r10, [r11], #0
24712489
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r1, r1, [r0], #0
24722490
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r6, r3, [r5], #-8
2491+
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r8, r5, [r6], #-0
24732492
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r7, r4, [r5], #-4
24742493
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r0, r1, [r2, #-0]!
24752494
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r0, r1, [r2, #0]!

llvm/test/tools/llvm-mca/X86/BtVer2/simple-test.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
22
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=100 < %s | FileCheck %s
3+
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=100 -skip-unsupported-instructions=lack-sched < %s | FileCheck %s
4+
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=100 -skip-unsupported-instructions=parse-failure < %s | FileCheck %s
5+
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=100 -skip-unsupported-instructions=any < %s | FileCheck %s
36

47
add %edi, %eax
58

llvm/test/tools/llvm-mca/X86/BtVer2/skip-unsupported-instructions-none-remain.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -skip-unsupported-instructions %s 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-SKIP %s
1+
# RUN: not llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -skip-unsupported-instructions=lack-sched %s 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-SKIP %s
22
# RUN: not llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 %s 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-ERROR %s
33

44
# Test defends that if all instructions are skipped leaving an empty input, an error is printed.
@@ -7,7 +7,7 @@ bzhi %eax, %ebx, %ecx
77

88
# CHECK-ALL-NOT: error
99

10-
# CHECK-ERROR: error: found an unsupported instruction in the input assembly sequence, use -skip-unsupported-instructions to ignore.
10+
# CHECK-ERROR: error: found an unsupported instruction in the input assembly sequence, use -skip-unsupported-instructions=lack-sched to ignore these on the input.
1111

1212
# CHECK-SKIP: warning: found an unsupported instruction in the input assembly sequence, skipping with -skip-unsupported-instructions, note accuracy will be impacted:
1313
# CHECK-SKIP: note: instruction: bzhil %eax, %ebx, %ecx

llvm/test/tools/llvm-mca/X86/BtVer2/unsupported-instruction.s

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -skip-unsupported-instructions -timeline %s 2>&1 | FileCheck --check-prefix=CHECK-SKIP %s
1+
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -skip-unsupported-instructions=any -timeline %s 2>&1 | FileCheck --check-prefix=CHECK-SKIP %s
2+
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -skip-unsupported-instructions=lack-sched -timeline %s 2>&1 | FileCheck --check-prefix=CHECK-SKIP %s
3+
# RUN: not llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -skip-unsupported-instructions=parse-failure -timeline %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
24
# RUN: not llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
35

4-
# Test checks that unsupported instructions exit with an error, unless -skip-unsupported-instructions is passed, in which case the remaining instructions should be analysed.
6+
# Test checks that unsupported instructions exit with an error, unless -skip-unsupported-instructions=lack-sched is passed, in which case the remaining instructions should be analysed.
7+
# Additionally check that -skip-unsupported-instructions=parse-failure continues to raise the lack of scheduling information.
58

69
# CHECK-SKIP: warning: found an unsupported instruction in the input assembly sequence, skipping with -skip-unsupported-instructions, note accuracy will be impacted:
7-
# CHECK-ERROR: error: found an unsupported instruction in the input assembly sequence, use -skip-unsupported-instructions to ignore.
10+
# CHECK-ERROR: error: found an unsupported instruction in the input assembly sequence, use -skip-unsupported-instructions=lack-sched to ignore these on the input.
811

912
bzhi %eax, %ebx, %ecx
1013

llvm/test/tools/llvm-mca/bad-input.s

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# RUN: not llvm-mca %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
2+
# RUN: not llvm-mca -skip-unsupported-instructions=none %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
3+
# RUN: not llvm-mca -skip-unsupported-instructions=lack-sched %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
4+
# RUN: not llvm-mca -skip-unsupported-instructions=parse-failure %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-SKIP %s
5+
# RUN: not llvm-mca -skip-unsupported-instructions=any %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-SKIP %s
6+
7+
# Test checks that MCA does not produce a total cycles estimate if it encounters parse errors.
8+
9+
# CHECK-ALL-NOT: Total Cycles:
10+
11+
# CHECK: error: Assembly input parsing had errors, use -skip-unsupported-instructions=parse-failure to drop failing lines from the input.
12+
# CHECK-SKIP: error: no assembly instructions found.
13+
14+
This is not a valid assembly file for any architecture (by virtue of this text.)

llvm/tools/llvm-mca/CodeRegionGenerator.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace mca {
2929
CodeRegionGenerator::~CodeRegionGenerator() {}
3030

3131
Expected<const CodeRegions &> AsmCodeRegionGenerator::parseCodeRegions(
32-
const std::unique_ptr<MCInstPrinter> &IP) {
32+
const std::unique_ptr<MCInstPrinter> &IP, bool SkipFailures) {
3333
MCTargetOptions Opts;
3434
Opts.PreserveAsmComments = false;
3535
CodeRegions &Regions = getRegions();
@@ -61,7 +61,16 @@ Expected<const CodeRegions &> AsmCodeRegionGenerator::parseCodeRegions(
6161
"This target does not support assembly parsing.",
6262
inconvertibleErrorCode());
6363
Parser->setTargetParser(*TAP);
64-
Parser->Run(false);
64+
// Parser->Run() confusingly returns true on errors, in which case the errors
65+
// were already shown to the user. SkipFailures implies continuing in the
66+
// presence of any kind of failure within the parser, in which case failing
67+
// input lines are not represented, but the rest of the input remains.
68+
if (Parser->Run(false) && !SkipFailures) {
69+
const char *Message = "Assembly input parsing had errors, use "
70+
"-skip-unsupported-instructions=parse-failure "
71+
"to drop failing lines from the input.";
72+
return make_error<StringError>(Message, inconvertibleErrorCode());
73+
}
6574

6675
if (CCP->hadErr())
6776
return make_error<StringError>("There was an error parsing comments.",

llvm/tools/llvm-mca/CodeRegionGenerator.h

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ class CodeRegionGenerator {
148148
CodeRegionGenerator(const CodeRegionGenerator &) = delete;
149149
CodeRegionGenerator &operator=(const CodeRegionGenerator &) = delete;
150150
virtual Expected<const CodeRegions &>
151-
parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP) = 0;
151+
parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP,
152+
bool SkipFailures) = 0;
152153

153154
public:
154155
CodeRegionGenerator() {}
@@ -164,7 +165,8 @@ class AnalysisRegionGenerator : public virtual CodeRegionGenerator {
164165
AnalysisRegionGenerator(llvm::SourceMgr &SM) : Regions(SM) {}
165166

166167
virtual Expected<const AnalysisRegions &>
167-
parseAnalysisRegions(const std::unique_ptr<MCInstPrinter> &IP) = 0;
168+
parseAnalysisRegions(const std::unique_ptr<MCInstPrinter> &IP,
169+
bool SkipFailures) = 0;
168170
};
169171

170172
/// Abstract CodeRegionGenerator with InstrumentRegionsRegions member
@@ -176,7 +178,8 @@ class InstrumentRegionGenerator : public virtual CodeRegionGenerator {
176178
InstrumentRegionGenerator(llvm::SourceMgr &SM) : Regions(SM) {}
177179

178180
virtual Expected<const InstrumentRegions &>
179-
parseInstrumentRegions(const std::unique_ptr<MCInstPrinter> &IP) = 0;
181+
parseInstrumentRegions(const std::unique_ptr<MCInstPrinter> &IP,
182+
bool SkipFailures) = 0;
180183
};
181184

182185
/// This abstract class is responsible for parsing input ASM and
@@ -202,7 +205,8 @@ class AsmCodeRegionGenerator : public virtual CodeRegionGenerator {
202205

203206
unsigned getAssemblerDialect() const { return AssemblerDialect; }
204207
Expected<const CodeRegions &>
205-
parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP) override;
208+
parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP,
209+
bool SkipFailures) override;
206210
};
207211

208212
class AsmAnalysisRegionGenerator final : public AnalysisRegionGenerator,
@@ -222,17 +226,20 @@ class AsmAnalysisRegionGenerator final : public AnalysisRegionGenerator,
222226
MCStreamerWrapper *getMCStreamer() override { return &Streamer; }
223227

224228
Expected<const AnalysisRegions &>
225-
parseAnalysisRegions(const std::unique_ptr<MCInstPrinter> &IP) override {
226-
Expected<const CodeRegions &> RegionsOrErr = parseCodeRegions(IP);
229+
parseAnalysisRegions(const std::unique_ptr<MCInstPrinter> &IP,
230+
bool SkipFailures) override {
231+
Expected<const CodeRegions &> RegionsOrErr =
232+
parseCodeRegions(IP, SkipFailures);
227233
if (!RegionsOrErr)
228234
return RegionsOrErr.takeError();
229235
else
230236
return static_cast<const AnalysisRegions &>(*RegionsOrErr);
231237
}
232238

233239
Expected<const CodeRegions &>
234-
parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP) override {
235-
return AsmCodeRegionGenerator::parseCodeRegions(IP);
240+
parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP,
241+
bool SkipFailures) override {
242+
return AsmCodeRegionGenerator::parseCodeRegions(IP, SkipFailures);
236243
}
237244
};
238245

@@ -254,17 +261,20 @@ class AsmInstrumentRegionGenerator final : public InstrumentRegionGenerator,
254261
MCStreamerWrapper *getMCStreamer() override { return &Streamer; }
255262

256263
Expected<const InstrumentRegions &>
257-
parseInstrumentRegions(const std::unique_ptr<MCInstPrinter> &IP) override {
258-
Expected<const CodeRegions &> RegionsOrErr = parseCodeRegions(IP);
264+
parseInstrumentRegions(const std::unique_ptr<MCInstPrinter> &IP,
265+
bool SkipFailures) override {
266+
Expected<const CodeRegions &> RegionsOrErr =
267+
parseCodeRegions(IP, SkipFailures);
259268
if (!RegionsOrErr)
260269
return RegionsOrErr.takeError();
261270
else
262271
return static_cast<const InstrumentRegions &>(*RegionsOrErr);
263272
}
264273

265274
Expected<const CodeRegions &>
266-
parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP) override {
267-
return AsmCodeRegionGenerator::parseCodeRegions(IP);
275+
parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP,
276+
bool SkipFailures) override {
277+
return AsmCodeRegionGenerator::parseCodeRegions(IP, SkipFailures);
268278
}
269279
};
270280

0 commit comments

Comments
 (0)