LCOV - code coverage report
Current view: top level - build-llvm/lib/Target/BPF - BPFGenSubtargetInfo.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 6 13 46.2 %
Date: 2017-09-14 15:23:50 Functions: 2 6 33.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
       2             : |*                                                                            *|
       3             : |* Subtarget Enumeration Source Fragment                                      *|
       4             : |*                                                                            *|
       5             : |* Automatically generated file, do not edit!                                 *|
       6             : |*                                                                            *|
       7             : \*===----------------------------------------------------------------------===*/
       8             : 
       9             : 
      10             : #ifdef GET_SUBTARGETINFO_ENUM
      11             : #undef GET_SUBTARGETINFO_ENUM
      12             : 
      13             : namespace llvm {
      14             : namespace BPF {
      15             : enum {
      16             :   DummyFeature = 0
      17             : };
      18             : } // end namespace BPF
      19             : } // end namespace llvm
      20             : 
      21             : #endif // GET_SUBTARGETINFO_ENUM
      22             : 
      23             : 
      24             : #ifdef GET_SUBTARGETINFO_MC_DESC
      25             : #undef GET_SUBTARGETINFO_MC_DESC
      26             : 
      27             : namespace llvm {
      28             : // Sorted (by key) array of values for CPU features.
      29             : extern const llvm::SubtargetFeatureKV BPFFeatureKV[] = {
      30             :   { "dummy", "unused feature", { BPF::DummyFeature }, { } }
      31       72306 : };
      32             : 
      33             : // Sorted (by key) array of values for CPU subtype.
      34             : extern const llvm::SubtargetFeatureKV BPFSubTypeKV[] = {
      35             :   { "generic", "Select the generic processor", { }, { } },
      36             :   { "probe", "Select the probe processor", { }, { } },
      37             :   { "v1", "Select the v1 processor", { }, { } },
      38             :   { "v2", "Select the v2 processor", { }, { } }
      39             : };
      40             : 
      41             : #ifdef DBGFIELD
      42             : #error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro"
      43             : #endif
      44             : #ifndef NDEBUG
      45             : #define DBGFIELD(x) x,
      46             : #else
      47             : #define DBGFIELD(x)
      48             : #endif
      49             : 
      50             : // ===============================================================
      51             : // Data tables for the new per-operand machine model.
      52             : 
      53             : // {ProcResourceIdx, Cycles}
      54             : extern const llvm::MCWriteProcResEntry BPFWriteProcResTable[] = {
      55             :   { 0,  0}, // Invalid
      56             : }; // BPFWriteProcResTable
      57             : 
      58             : // {Cycles, WriteResourceID}
      59             : extern const llvm::MCWriteLatencyEntry BPFWriteLatencyTable[] = {
      60             :   { 0,  0}, // Invalid
      61             : }; // BPFWriteLatencyTable
      62             : 
      63             : // {UseIdx, WriteResourceID, Cycles}
      64             : extern const llvm::MCReadAdvanceEntry BPFReadAdvanceTable[] = {
      65             :   {0,  0,  0}, // Invalid
      66             : }; // BPFReadAdvanceTable
      67             : 
      68             : static const llvm::MCSchedModel NoSchedModel = {
      69             :   MCSchedModel::DefaultIssueWidth,
      70             :   MCSchedModel::DefaultMicroOpBufferSize,
      71             :   MCSchedModel::DefaultLoopMicroOpBufferSize,
      72             :   MCSchedModel::DefaultLoadLatency,
      73             :   MCSchedModel::DefaultHighLatency,
      74             :   MCSchedModel::DefaultMispredictPenalty,
      75             :   false, // PostRAScheduler
      76             :   false, // CompleteModel
      77             :   0, // Processor ID
      78             :   nullptr, nullptr, 0, 0, // No instruction-level machine model.
      79             :   nullptr}; // No Itinerary
      80             : 
      81             : // Sorted (by key) array of itineraries for CPU subtype.
      82             : extern const llvm::SubtargetInfoKV BPFProcSchedKV[] = {
      83             :   { "generic", (const void *)&NoSchedModel },
      84             :   { "probe", (const void *)&NoSchedModel },
      85             :   { "v1", (const void *)&NoSchedModel },
      86             :   { "v2", (const void *)&NoSchedModel }
      87             : };
      88             : #undef DBGFIELD
      89          54 : static inline MCSubtargetInfo *createBPFMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef FS) {
      90             :   return new MCSubtargetInfo(TT, CPU, FS, BPFFeatureKV, BPFSubTypeKV, 
      91             :                       BPFProcSchedKV, BPFWriteProcResTable, BPFWriteLatencyTable, BPFReadAdvanceTable, 
      92         162 :                       nullptr, nullptr, nullptr);
      93             : }
      94             : 
      95             : } // end namespace llvm
      96             : 
      97             : #endif // GET_SUBTARGETINFO_MC_DESC
      98             : 
      99             : 
     100             : #ifdef GET_SUBTARGETINFO_TARGET_DESC
     101             : #undef GET_SUBTARGETINFO_TARGET_DESC
     102             : 
     103             : #include "llvm/Support/Debug.h"
     104             : #include "llvm/Support/raw_ostream.h"
     105             : 
     106             : // ParseSubtargetFeatures - Parses features string setting specified
     107             : // subtarget options.
     108           0 : void llvm::BPFSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef FS) {
     109             :   DEBUG(dbgs() << "\nFeatures:" << FS);
     110             :   DEBUG(dbgs() << "\nCPU:" << CPU << "\n\n");
     111           0 :   InitMCProcessorInfo(CPU, FS);
     112           0 :   const FeatureBitset& Bits = getFeatureBits();
     113           0 :   if (Bits[BPF::DummyFeature]) isDummyMode = true;
     114           0 : }
     115             : #endif // GET_SUBTARGETINFO_TARGET_DESC
     116             : 
     117             : 
     118             : #ifdef GET_SUBTARGETINFO_HEADER
     119             : #undef GET_SUBTARGETINFO_HEADER
     120             : 
     121             : namespace llvm {
     122             : class DFAPacketizer;
     123          48 : struct BPFGenSubtargetInfo : public TargetSubtargetInfo {
     124             :   explicit BPFGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS);
     125             : public:
     126             :   unsigned resolveSchedClass(unsigned SchedClass,  const MachineInstr *DefMI, const TargetSchedModel *SchedModel) const override;
     127             :   DFAPacketizer *createDFAPacketizer(const InstrItineraryData *IID) const;
     128             : };
     129             : } // end namespace llvm
     130             : 
     131             : #endif // GET_SUBTARGETINFO_HEADER
     132             : 
     133             : 
     134             : #ifdef GET_SUBTARGETINFO_CTOR
     135             : #undef GET_SUBTARGETINFO_CTOR
     136             : 
     137             : #include "llvm/CodeGen/TargetSchedule.h"
     138             : 
     139             : namespace llvm {
     140             : extern const llvm::SubtargetFeatureKV BPFFeatureKV[];
     141             : extern const llvm::SubtargetFeatureKV BPFSubTypeKV[];
     142             : extern const llvm::SubtargetInfoKV BPFProcSchedKV[];
     143             : extern const llvm::MCWriteProcResEntry BPFWriteProcResTable[];
     144             : extern const llvm::MCWriteLatencyEntry BPFWriteLatencyTable[];
     145             : extern const llvm::MCReadAdvanceEntry BPFReadAdvanceTable[];
     146          49 : BPFGenSubtargetInfo::BPFGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
     147             :   : TargetSubtargetInfo(TT, CPU, FS, makeArrayRef(BPFFeatureKV, 1), makeArrayRef(BPFSubTypeKV, 4), 
     148             :                         BPFProcSchedKV, BPFWriteProcResTable, BPFWriteLatencyTable, BPFReadAdvanceTable, 
     149         147 :                         nullptr, nullptr, nullptr) {}
     150             : 
     151           0 : unsigned BPFGenSubtargetInfo
     152             : ::resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const {
     153           0 :   report_fatal_error("Expected a variant SchedClass");
     154             : } // BPFGenSubtargetInfo::resolveSchedClass
     155             : } // end namespace llvm
     156             : 
     157             : #endif // GET_SUBTARGETINFO_CTOR
     158             : 

Generated by: LCOV version 1.13