1 //==-- AArch64Subtarget.h - Define Subtarget for the AArch64 ---*- 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 AArch64 specific subclass of TargetSubtargetInfo.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TARGET_AARCH64_SUBTARGET_H
15 #define LLVM_TARGET_AARCH64_SUBTARGET_H
17 #include "llvm/ADT/Triple.h"
18 #include "llvm/Target/TargetSubtargetInfo.h"
20 #define GET_SUBTARGETINFO_HEADER
21 #include "AArch64GenSubtargetInfo.inc"
29 class AArch64Subtarget : public AArch64GenSubtargetInfo {
34 /// TargetTriple - What processor and OS we're targeting.
37 /// This constructor initializes the data members to match that
38 /// of the specified triple.
40 AArch64Subtarget(StringRef TT, StringRef CPU, StringRef FS);
42 virtual bool enableMachineScheduler() const {
46 /// ParseSubtargetFeatures - Parses features string setting specified
47 /// subtarget options. Definition of function is auto generated by tblgen.
48 void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
50 bool GVIsIndirectSymbol(const GlobalValue *GV, Reloc::Model RelocM) const;
52 bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
53 bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
55 bool hasNEON() const { return HasNEON; }
57 bool hasCrypto() const { return HasCrypto; }
59 } // End llvm namespace
61 #endif // LLVM_TARGET_AARCH64_SUBTARGET_H