LLVM  5.0.0
AArch64CallLowering.h
Go to the documentation of this file.
1 //===--- AArch64CallLowering.h - Call lowering ------------------*- 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 /// \file
11 /// This file describes how to lower LLVM calls to machine code calls.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64CALLLOWERING_H
16 #define LLVM_LIB_TARGET_AARCH64_AARCH64CALLLOWERING_H
17 
18 #include "llvm/ADT/ArrayRef.h"
20 #include <cstdint>
21 #include <functional>
22 
23 namespace llvm {
24 
25 class AArch64TargetLowering;
26 
28 public:
30 
31  bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
32  unsigned VReg) const override;
33 
34  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
35  ArrayRef<unsigned> VRegs) const override;
36 
37  bool lowerCall(MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv,
38  const MachineOperand &Callee, const ArgInfo &OrigRet,
39  ArrayRef<ArgInfo> OrigArgs) const override;
40 
41 private:
42  typedef std::function<void(MachineIRBuilder &, Type *, unsigned,
43  CCValAssign &)>
44  RegHandler;
45 
46  typedef std::function<void(MachineIRBuilder &, int, CCValAssign &)>
47  MemHandler;
48 
49  typedef std::function<void(unsigned, uint64_t)> SplitArgTy;
50 
51  void splitToValueTypes(const ArgInfo &OrigArgInfo,
52  SmallVectorImpl<ArgInfo> &SplitArgs,
54  const SplitArgTy &SplitArg) const;
55 };
56 
57 } // end namespace llvm
58 
59 #endif // LLVM_LIB_TARGET_AARCH64_AARCH64CALLLOWERING_H
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:109
DataLayout DL
static const MCPhysReg VRegs[32]
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:42
#define F(x, y, z)
Definition: MD5.cpp:55
bool lowerCall(MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv, const MachineOperand &Callee, const ArgInfo &OrigRet, ArrayRef< ArgInfo > OrigArgs) const override
This hook must be implemented to lower the given call instruction, including argument and return valu...
unsigned const MachineRegisterInfo * MRI
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
Helper class to build MachineInstr.
bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val, unsigned VReg) const override
This hook must be implemented to lower outgoing return values, described by Val, into the specified v...
MachineOperand class - Representation of each machine instruction operand.
CCValAssign - Represent assignment of one arg/retval to a location.
bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< unsigned > VRegs) const override
This hook must be implemented to lower the incoming (formal) arguments, described by Args...
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
LLVM Value Representation.
Definition: Value.h:73
This file describes how to lower LLVM calls to machine code calls.
print Print MemDeps of function
AArch64CallLowering(const AArch64TargetLowering &TLI)