LLVM  4.0.0
AArch64CallLowering.h
Go to the documentation of this file.
1 //===-- llvm/lib/Target/AArch64/AArch64CallLowering.h - Call lowering -----===//
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
16 #define LLVM_LIB_TARGET_AARCH64_AARCH64CALLLOWERING
17 
20 
21 namespace llvm {
22 
23 class AArch64TargetLowering;
24 
26  public:
28 
29  bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
30  unsigned VReg) const override;
31 
32  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
33  ArrayRef<unsigned> VRegs) const override;
34 
35  bool lowerCall(MachineIRBuilder &MIRBuilder, const MachineOperand &Callee,
36  const ArgInfo &OrigRet,
37  ArrayRef<ArgInfo> OrigArgs) const override;
38 
39 private:
40  typedef std::function<void(MachineIRBuilder &, Type *, unsigned,
41  CCValAssign &)>
42  RegHandler;
43 
44  typedef std::function<void(MachineIRBuilder &, int, CCValAssign &)>
45  MemHandler;
46 
47  typedef std::function<void(ArrayRef<unsigned>, ArrayRef<uint64_t>)>
48  SplitArgTy;
49 
50  void splitToValueTypes(const ArgInfo &OrigArgInfo,
51  SmallVectorImpl<ArgInfo> &SplitArgs,
53  SplitArgTy SplitArg) const;
54 };
55 } // End of namespace llvm;
56 #endif
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:102
static const MCPhysReg VRegs[32]
bool lowerCall(MachineIRBuilder &MIRBuilder, 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...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:32
#define F(x, y, z)
Definition: MD5.cpp:51
unsigned const MachineRegisterInfo * MRI
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
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:71
This file describes how to lower LLVM calls to machine code calls.
print Print MemDeps of function
AArch64CallLowering(const AArch64TargetLowering &TLI)