blob: d71bb4e9734e1cde028cb93d4b09b7933299f40f [file] [log] [blame]
Tim Northovere0e3aef2013-01-31 12:12:40 +00001//===-- AArch64Subtarget.cpp - AArch64 Subtarget Information --------------===//
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 AArch64 specific subclass of TargetSubtargetInfo.
11//
12//===----------------------------------------------------------------------===//
13
14#include "AArch64Subtarget.h"
15#include "AArch64RegisterInfo.h"
16#include "MCTargetDesc/AArch64MCTargetDesc.h"
17#include "llvm/IR/GlobalValue.h"
18#include "llvm/Target/TargetSubtargetInfo.h"
19#include "llvm/Support/CommandLine.h"
20#include "llvm/ADT/SmallVector.h"
21
22#define GET_SUBTARGETINFO_TARGET_DESC
23#define GET_SUBTARGETINFO_CTOR
24#include "AArch64GenSubtargetInfo.inc"
25
26using namespace llvm;
27
28AArch64Subtarget::AArch64Subtarget(StringRef TT, StringRef CPU, StringRef FS)
Tim Northover40e9efd2013-08-01 09:20:35 +000029 : AArch64GenSubtargetInfo(TT, CPU, FS), HasNEON(false), HasCrypto(false),
30 TargetTriple(TT) {
Tim Northovere0e3aef2013-01-31 12:12:40 +000031
32 ParseSubtargetFeatures(CPU, FS);
33}
34
35bool AArch64Subtarget::GVIsIndirectSymbol(const GlobalValue *GV,
36 Reloc::Model RelocM) const {
37 if (RelocM == Reloc::Static)
38 return false;
39
40 return !GV->hasLocalLinkage() && !GV->hasHiddenVisibility();
41}