Skip to content

Commit

Permalink
[llvm-mca] Fix -Wunused-private-field after D105618
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Jul 9, 2021
1 parent 9a7afae commit a2860b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions llvm/tools/llvm-mca/PipelinePrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ namespace mca {
class PipelinePrinter {
Pipeline &P;
llvm::SmallVector<std::unique_ptr<View>, 8> Views;
View::OutputKind OutputKind;

public:
PipelinePrinter(Pipeline &pipeline, View::OutputKind OutputKind)
: P(pipeline), OutputKind(OutputKind) {}
PipelinePrinter(Pipeline &pipeline) : P(pipeline) {}

void addView(std::unique_ptr<View> V) {
P.addEventListener(V.get());
Expand Down
5 changes: 2 additions & 3 deletions llvm/tools/llvm-mca/llvm-mca.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ int main(int argc, char **argv) {
auto P = std::make_unique<mca::Pipeline>();
P->appendStage(std::make_unique<mca::EntryStage>(S));
P->appendStage(std::make_unique<mca::InstructionTables>(SM));
mca::PipelinePrinter Printer(*P, mca::View::OK_READABLE);
mca::PipelinePrinter Printer(*P);

// Create the views for this pipeline, execute, and emit a report.
if (PrintInstructionInfoView) {
Expand Down Expand Up @@ -614,8 +614,7 @@ int main(int argc, char **argv) {

// Create a basic pipeline simulating an out-of-order backend.
auto P = MCA.createDefaultPipeline(PO, S, *CB);
mca::PipelinePrinter Printer(*P, PrintJson ? mca::View::OK_JSON
: mca::View::OK_READABLE);
mca::PipelinePrinter Printer(*P);

// When we output JSON, we add a view that contains the instructions
// and CPU resource information.
Expand Down

1 comment on commit a2860b8

@markoshorro
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

Please sign in to comment.