LLVM 24.0.0git
AArch64.cpp
Go to the documentation of this file.
1//===- AArch64.cpp - AArch64 ABI 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//===----------------------------------------------------------------------===//
8
10#include "llvm/ABI/TargetInfo.h"
11#include "llvm/ABI/Types.h"
13
14namespace llvm {
15namespace abi {
16
18public:
20 : TB(TB), Kind(Kind) {}
21
22 void computeInfo(FunctionInfo &FI) const override {
24 for (auto &I : FI.arguments())
25 I.Info = ArgInfo::getDirect();
26 }
27
28private:
29 [[maybe_unused]] TypeBuilder &TB;
30 [[maybe_unused]] AArch64ABIKind Kind;
31};
32
33std::unique_ptr<TargetInfo> createAArch64TargetInfo(TypeBuilder &TB,
34 AArch64ABIKind Kind) {
35 if (Kind == AArch64ABIKind::Win64)
36 llvm_unreachable("Win64 ABI not supported yet");
37 return std::make_unique<AArch64TargetInfo>(TB, Kind);
38}
39
40} // namespace abi
41} // namespace llvm
#define I(x, y, z)
Definition MD5.cpp:57
Target-specific ABI information and factory functions.
AArch64TargetInfo(TypeBuilder &TB, AArch64ABIKind Kind)
Definition AArch64.cpp:19
void computeInfo(FunctionInfo &FI) const override
Populate FI with the target's ABI-lowering decisions for each argument and return value.
Definition AArch64.cpp:22
static ArgInfo getDirect(const Type *T=nullptr, unsigned Offset=0, MaybeAlign Align=std::nullopt)
ArrayRef< ArgEntry > arguments() const
TypeBuilder manages the lifecycle of ABI types using bump pointer allocation.
Definition Types.h:335
This file defines the type system for the LLVMABI library, which mirrors ABI-relevant aspects of fron...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
LLVM_ABI std::unique_ptr< TargetInfo > createAArch64TargetInfo(TypeBuilder &TB, AArch64ABIKind Kind)
Definition AArch64.cpp:33
This is an optimization pass for GlobalISel generic memory operations.