[PATCH] D138462: [llvm-mca] Fix class dominance warnings for parseCodeRegions
Michael Maitland via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 16:11:13 PST 2022
michaelmaitland created this revision.
michaelmaitland added reviewers: RKSimon, myhsu, andreadb.
Herald added a subscriber: gbedwell.
Herald added a project: All.
michaelmaitland requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Fixes issue 59091 <https://github.com/llvm/llvm-project/issues/59091>.
`CodeRegionGenerator::parseCodeRegions` is implemented by `AsmCodeRegionGenerator`.
If it were to be implemented in `AnalysisRegionGenerator` or `InstrumentRegionGenerator`,
then `parseCodeRegions` from an `AsmAnalysisRegionGenerator` or `AsmInstrumentRegionGenerator`
object would be ambiguous. To solve this, `AsmAnalysisRegionGenerator` and
`AsmInstrumentRegionGenerator` qualify their call to `AsmCodeRegionGenerator::parseCodeRegions`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138462
Files:
llvm/tools/llvm-mca/CodeRegionGenerator.h
Index: llvm/tools/llvm-mca/CodeRegionGenerator.h
===================================================================
--- llvm/tools/llvm-mca/CodeRegionGenerator.h
+++ llvm/tools/llvm-mca/CodeRegionGenerator.h
@@ -162,6 +162,11 @@
else
return static_cast<const AnalysisRegions &>(*RegionsOrErr);
}
+
+ Expected<const CodeRegions &>
+ parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP) override {
+ return AsmCodeRegionGenerator::parseCodeRegions(IP);
+ }
};
class AsmInstrumentRegionGenerator final : public InstrumentRegionGenerator,
@@ -187,6 +192,11 @@
else
return static_cast<const InstrumentRegions &>(*RegionsOrErr);
}
+
+ Expected<const CodeRegions &>
+ parseCodeRegions(const std::unique_ptr<MCInstPrinter> &IP) override {
+ return AsmCodeRegionGenerator::parseCodeRegions(IP);
+ }
};
} // namespace mca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138462.477023.patch
Type: text/x-patch
Size: 869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221122/56b0d4d4/attachment.bin>
More information about the llvm-commits
mailing list