Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / lib / Target / AArch64 / TargetInfo / AArch64TargetInfo.cpp
blobe710f46393549b7a485c7b6a459019695cf2034b
1 //===-- AArch64TargetInfo.cpp - AArch64 Target Implementation -----------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "llvm/ADT/Triple.h"
10 #include "llvm/Support/TargetRegistry.h"
11 using namespace llvm;
12 namespace llvm {
13 Target &getTheAArch64leTarget() {
14 static Target TheAArch64leTarget;
15 return TheAArch64leTarget;
17 Target &getTheAArch64beTarget() {
18 static Target TheAArch64beTarget;
19 return TheAArch64beTarget;
21 Target &getTheARM64Target() {
22 static Target TheARM64Target;
23 return TheARM64Target;
25 } // namespace llvm
27 extern "C" void LLVMInitializeAArch64TargetInfo() {
28 // Now register the "arm64" name for use with "-march". We don't want it to
29 // take possession of the Triple::aarch64 tag though.
30 TargetRegistry::RegisterTarget(getTheARM64Target(), "arm64",
31 "ARM64 (little endian)", "AArch64",
32 [](Triple::ArchType) { return false; }, true);
34 RegisterTarget<Triple::aarch64, /*HasJIT=*/true> Z(
35 getTheAArch64leTarget(), "aarch64", "AArch64 (little endian)", "AArch64");
36 RegisterTarget<Triple::aarch64_be, /*HasJIT=*/true> W(
37 getTheAArch64beTarget(), "aarch64_be", "AArch64 (big endian)", "AArch64");