LCOV - code coverage report
Current view: top level - build-llvm/lib/Target/XCore - XCoreGenSubtargetInfo.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 5 9 55.6 %
Date: 2018-02-18 16:14:26 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             : } // end namespace llvm
      15             : 
      16             : #endif // GET_SUBTARGETINFO_ENUM
      17             : 
      18             : 
      19             : #ifdef GET_SUBTARGETINFO_MC_DESC
      20             : #undef GET_SUBTARGETINFO_MC_DESC
      21             : 
      22             : namespace llvm {
      23             : 
      24             : // Sorted (by key) array of values for CPU subtype.
      25             : extern const llvm::SubtargetFeatureKV XCoreSubTypeKV[] = {
      26             :   { "generic", "Select the generic processor", { }, { } },
      27             :   { "xs1b-generic", "Select the xs1b-generic processor", { }, { } },
      28             : };
      29             : 
      30             : #ifdef DBGFIELD
      31             : #error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro"
      32             : #endif
      33             : #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
      34             : #define DBGFIELD(x) x,
      35             : #else
      36             : #define DBGFIELD(x)
      37             : #endif
      38             : 
      39             : // ===============================================================
      40             : // Data tables for the new per-operand machine model.
      41             : 
      42             : // {ProcResourceIdx, Cycles}
      43             : extern const llvm::MCWriteProcResEntry XCoreWriteProcResTable[] = {
      44             :   { 0,  0}, // Invalid
      45             : }; // XCoreWriteProcResTable
      46             : 
      47             : // {Cycles, WriteResourceID}
      48             : extern const llvm::MCWriteLatencyEntry XCoreWriteLatencyTable[] = {
      49             :   { 0,  0}, // Invalid
      50             : }; // XCoreWriteLatencyTable
      51             : 
      52             : // {UseIdx, WriteResourceID, Cycles}
      53             : extern const llvm::MCReadAdvanceEntry XCoreReadAdvanceTable[] = {
      54             :   {0,  0,  0}, // Invalid
      55             : }; // XCoreReadAdvanceTable
      56             : 
      57             : static const llvm::MCSchedModel NoSchedModel = {
      58             :   MCSchedModel::DefaultIssueWidth,
      59             :   MCSchedModel::DefaultMicroOpBufferSize,
      60             :   MCSchedModel::DefaultLoopMicroOpBufferSize,
      61             :   MCSchedModel::DefaultLoadLatency,
      62             :   MCSchedModel::DefaultHighLatency,
      63             :   MCSchedModel::DefaultMispredictPenalty,
      64             :   false, // PostRAScheduler
      65             :   false, // CompleteModel
      66             :   0, // Processor ID
      67             :   nullptr, nullptr, 0, 0, // No instruction-level machine model.
      68             :   nullptr // No Itinerary
      69             : };
      70             : 
      71             : // Sorted (by key) array of itineraries for CPU subtype.
      72             : extern const llvm::SubtargetInfoKV XCoreProcSchedKV[] = {
      73             :   { "generic", (const void *)&NoSchedModel },
      74             :   { "xs1b-generic", (const void *)&NoSchedModel },
      75             : };
      76             : 
      77             : #undef DBGFIELD
      78             : 
      79          81 : static inline MCSubtargetInfo *createXCoreMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef FS) {
      80             :   return new MCSubtargetInfo(TT, CPU, FS, None, XCoreSubTypeKV, 
      81             :                       XCoreProcSchedKV, XCoreWriteProcResTable, XCoreWriteLatencyTable, XCoreReadAdvanceTable, 
      82         162 :                       nullptr, nullptr, nullptr);
      83             : }
      84             : 
      85             : } // end namespace llvm
      86             : 
      87             : #endif // GET_SUBTARGETINFO_MC_DESC
      88             : 
      89             : 
      90             : #ifdef GET_SUBTARGETINFO_TARGET_DESC
      91             : #undef GET_SUBTARGETINFO_TARGET_DESC
      92             : 
      93             : #include "llvm/Support/Debug.h"
      94             : #include "llvm/Support/raw_ostream.h"
      95             : 
      96             : // ParseSubtargetFeatures - Parses features string setting specified
      97             : // subtarget options.
      98           0 : void llvm::XCoreSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef FS) {
      99             :   DEBUG(dbgs() << "\nFeatures:" << FS);
     100             :   DEBUG(dbgs() << "\nCPU:" << CPU << "\n\n");
     101           0 : }
     102             : #endif // GET_SUBTARGETINFO_TARGET_DESC
     103             : 
     104             : 
     105             : #ifdef GET_SUBTARGETINFO_HEADER
     106             : #undef GET_SUBTARGETINFO_HEADER
     107             : 
     108             : namespace llvm {
     109             : class DFAPacketizer;
     110          78 : struct XCoreGenSubtargetInfo : public TargetSubtargetInfo {
     111             :   explicit XCoreGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS);
     112             : public:
     113             :   unsigned resolveSchedClass(unsigned SchedClass,  const MachineInstr *DefMI, const TargetSchedModel *SchedModel) const override;
     114             :   DFAPacketizer *createDFAPacketizer(const InstrItineraryData *IID) const;
     115             : };
     116             : } // end namespace llvm
     117             : 
     118             : #endif // GET_SUBTARGETINFO_HEADER
     119             : 
     120             : 
     121             : #ifdef GET_SUBTARGETINFO_CTOR
     122             : #undef GET_SUBTARGETINFO_CTOR
     123             : 
     124             : #include "llvm/CodeGen/TargetSchedule.h"
     125             : 
     126             : namespace llvm {
     127             : extern const llvm::SubtargetFeatureKV XCoreFeatureKV[];
     128             : extern const llvm::SubtargetFeatureKV XCoreSubTypeKV[];
     129             : extern const llvm::SubtargetInfoKV XCoreProcSchedKV[];
     130             : extern const llvm::MCWriteProcResEntry XCoreWriteProcResTable[];
     131             : extern const llvm::MCWriteLatencyEntry XCoreWriteLatencyTable[];
     132             : extern const llvm::MCReadAdvanceEntry XCoreReadAdvanceTable[];
     133          80 : XCoreGenSubtargetInfo::XCoreGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
     134             :   : TargetSubtargetInfo(TT, CPU, FS, None, makeArrayRef(XCoreSubTypeKV, 2), 
     135             :                         XCoreProcSchedKV, XCoreWriteProcResTable, XCoreWriteLatencyTable, XCoreReadAdvanceTable, 
     136         160 :                         nullptr, nullptr, nullptr) {}
     137             : 
     138           0 : unsigned XCoreGenSubtargetInfo
     139             : ::resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const {
     140           0 :   report_fatal_error("Expected a variant SchedClass");
     141             : } // XCoreGenSubtargetInfo::resolveSchedClass
     142             : } // end namespace llvm
     143             : 
     144             : #endif // GET_SUBTARGETINFO_CTOR
     145             : 

Generated by: LCOV version 1.13