1 //===-- SystemZSubtarget.h - SystemZ 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 declares the SystemZ specific subclass of TargetSubtargetInfo. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef SYSTEMZSUBTARGET_H 15 #define SYSTEMZSUBTARGET_H 16 17 #include "llvm/ADT/Triple.h" 18 #include "llvm/Target/TargetSubtargetInfo.h" 19 #include <string> 20 21 #define GET_SUBTARGETINFO_HEADER 22 #include "SystemZGenSubtargetInfo.inc" 23 24 namespace llvm { 25 class GlobalValue; 26 class StringRef; 27 28 class SystemZSubtarget : public SystemZGenSubtargetInfo { 29 private: 30 Triple TargetTriple; 31 32 public: 33 SystemZSubtarget(const std::string &TT, const std::string &CPU, 34 const std::string &FS); 35 36 // Automatically generated by tblgen. 37 void ParseSubtargetFeatures(StringRef CPU, StringRef FS); 38 39 // Return true if GV can be accessed using LARL for reloc model RM 40 // and code model CM. 41 bool isPC32DBLSymbol(const GlobalValue *GV, Reloc::Model RM, 42 CodeModel::Model CM) const; 43 44 bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); } 45 }; 46 } // end namespace llvm 47 48 #endif 49