1 //===-- SystemZSubtarget.h - SystemZ subtarget information -----*- C++ -*--===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the SystemZ specific subclass of TargetSubtargetInfo.
12 //===----------------------------------------------------------------------===//
14 #ifndef SYSTEMZSUBTARGET_H
15 #define SYSTEMZSUBTARGET_H
17 #include "llvm/ADT/Triple.h"
18 #include "llvm/Target/TargetSubtargetInfo.h"
21 #define GET_SUBTARGETINFO_HEADER
22 #include "SystemZGenSubtargetInfo.inc"
28 class SystemZSubtarget : public SystemZGenSubtargetInfo {
29 virtual void anchor();
32 bool HasLoadStoreOnCond;
35 bool HasFastSerialization;
36 bool HasInterlockedAccess1;
42 SystemZSubtarget(const std::string &TT, const std::string &CPU,
43 const std::string &FS);
45 // This is important for reducing register pressure in vector code.
46 bool useAA() const override { return true; }
48 // Automatically generated by tblgen.
49 void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
51 // Return true if the target has the distinct-operands facility.
52 bool hasDistinctOps() const { return HasDistinctOps; }
54 // Return true if the target has the load/store-on-condition facility.
55 bool hasLoadStoreOnCond() const { return HasLoadStoreOnCond; }
57 // Return true if the target has the high-word facility.
58 bool hasHighWord() const { return HasHighWord; }
60 // Return true if the target has the floating-point extension facility.
61 bool hasFPExtension() const { return HasFPExtension; }
63 // Return true if the target has the fast-serialization facility.
64 bool hasFastSerialization() const { return HasFastSerialization; }
66 // Return true if the target has interlocked-access facility 1.
67 bool hasInterlockedAccess1() const { return HasInterlockedAccess1; }
69 // Return true if GV can be accessed using LARL for reloc model RM
71 bool isPC32DBLSymbol(const GlobalValue *GV, Reloc::Model RM,
72 CodeModel::Model CM) const;
74 bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
76 } // end namespace llvm