]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / llvm / lib / Target / AArch64 / AArch64Subtarget.h
1 //==-- AArch64Subtarget.h - Define Subtarget for the AArch64 ---*- 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 AArch64 specific subclass of TargetSubtargetInfo.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_TARGET_AARCH64_SUBTARGET_H
15 #define LLVM_TARGET_AARCH64_SUBTARGET_H
16
17 #include "llvm/ADT/Triple.h"
18 #include "llvm/Target/TargetSubtargetInfo.h"
19
20 #define GET_SUBTARGETINFO_HEADER
21 #include "AArch64GenSubtargetInfo.inc"
22
23 #include <string>
24
25 namespace llvm {
26 class StringRef;
27 class GlobalValue;
28
29 class AArch64Subtarget : public AArch64GenSubtargetInfo {
30 protected:
31   bool HasNEON;
32   bool HasCrypto;
33
34   /// TargetTriple - What processor and OS we're targeting.
35   Triple TargetTriple;
36 public:
37   /// This constructor initializes the data members to match that
38   /// of the specified triple.
39   ///
40   AArch64Subtarget(StringRef TT, StringRef CPU, StringRef FS);
41
42   /// ParseSubtargetFeatures - Parses features string setting specified
43   /// subtarget options.  Definition of function is auto generated by tblgen.
44   void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
45
46   bool GVIsIndirectSymbol(const GlobalValue *GV, Reloc::Model RelocM) const;
47
48   bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
49   bool isTargetLinux() const { return TargetTriple.getOS() == Triple::Linux; }
50
51 };
52 } // End llvm namespace
53
54 #endif  // LLVM_TARGET_AARCH64_SUBTARGET_H