1 //===- AlphaSubtarget.cpp - Alpha Subtarget Information ---------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file implements the Alpha specific subclass of TargetSubtargetInfo. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #include "AlphaSubtarget.h" 15 #include "Alpha.h" 16 17 #define GET_SUBTARGETINFO_TARGET_DESC 18 #define GET_SUBTARGETINFO_CTOR 19 #include "AlphaGenSubtargetInfo.inc" 20 21 using namespace llvm; 22 AlphaSubtarget(const std::string & TT,const std::string & CPU,const std::string & FS)23AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU, 24 const std::string &FS) 25 : AlphaGenSubtargetInfo(TT, CPU, FS), HasCT(false) { 26 std::string CPUName = CPU; 27 if (CPUName.empty()) 28 CPUName = "generic"; 29 30 // Parse features string. 31 ParseSubtargetFeatures(CPUName, FS); 32 33 // Initialize scheduling itinerary for the specified CPU. 34 InstrItins = getInstrItineraryForCPU(CPUName); 35 } 36