//===----------------------- CodeRegionGenerator.cpp ------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// \file /// /// This file defines classes responsible for generating llvm-mca /// CodeRegions from various types of input. llvm-mca only analyzes CodeRegions, /// so the classes here provide the input-to-CodeRegions translation. // //===----------------------------------------------------------------------===// #include "CodeRegionGenerator.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" #include "llvm/MC/MCParser/MCTargetAsmParser.h" #include "llvm/MC/MCTargetOptions.h" #include "llvm/Support/Error.h" #include "llvm/Support/SMLoc.h" #include <memory> namespace llvm { namespace mca { // This virtual dtor serves as the anchor for the CodeRegionGenerator class. CodeRegionGenerator::~CodeRegionGenerator() { … } Expected<const CodeRegions &> AsmCodeRegionGenerator::parseCodeRegions( const std::unique_ptr<MCInstPrinter> &IP, bool SkipFailures) { … } void AnalysisRegionCommentConsumer::HandleComment(SMLoc Loc, StringRef CommentText) { … } void InstrumentRegionCommentConsumer::HandleComment(SMLoc Loc, StringRef CommentText) { … } } // namespace mca } // namespace llvm