comparison lib/Target/X86/X86CallLowering.h @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents 1172e4bd9c6f
children
comparison
equal deleted inserted replaced
120:1172e4bd9c6f 121:803732b1fca8
1 //===-- llvm/lib/Target/X86/X86CallLowering.h - Call lowering -----===// 1 //===- llvm/lib/Target/X86/X86CallLowering.h - Call lowering ----*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 //
10 /// \file 10 /// \file
11 /// This file describes how to lower LLVM calls to machine code calls. 11 /// This file describes how to lower LLVM calls to machine code calls.
12 /// 12 //
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #ifndef LLVM_LIB_TARGET_X86_X86CALLLOWERING 15 #ifndef LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
16 #define LLVM_LIB_TARGET_X86_X86CALLLOWERING 16 #define LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
17 17
18 #include "llvm/ADT/ArrayRef.h" 18 #include "llvm/ADT/ArrayRef.h"
19 #include "llvm/CodeGen/GlobalISel/CallLowering.h" 19 #include "llvm/CodeGen/GlobalISel/CallLowering.h"
20 #include <functional>
20 21
21 namespace llvm { 22 namespace llvm {
22 23
23 class Function; 24 class DataLayout;
24 class MachineIRBuilder; 25 class MachineRegisterInfo;
25 class X86TargetLowering; 26 class X86TargetLowering;
26 class Value;
27 27
28 class X86CallLowering : public CallLowering { 28 class X86CallLowering : public CallLowering {
29 public: 29 public:
30 X86CallLowering(const X86TargetLowering &TLI); 30 X86CallLowering(const X86TargetLowering &TLI);
31 31
32 bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val, 32 bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
33 unsigned VReg) const override; 33 unsigned VReg) const override;
34 34
35 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, 35 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
36 ArrayRef<unsigned> VRegs) const override; 36 ArrayRef<unsigned> VRegs) const override;
37
38 bool lowerCall(MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv,
39 const MachineOperand &Callee, const ArgInfo &OrigRet,
40 ArrayRef<ArgInfo> OrigArgs) const override;
41
42 private:
43 /// A function of this type is used to perform value split action.
44 using SplitArgTy = std::function<void(ArrayRef<unsigned>)>;
45
46 bool splitToValueTypes(const ArgInfo &OrigArgInfo,
47 SmallVectorImpl<ArgInfo> &SplitArgs,
48 const DataLayout &DL, MachineRegisterInfo &MRI,
49 SplitArgTy SplitArg) const;
37 }; 50 };
38 } // End of namespace llvm; 51
39 #endif 52 } // end namespace llvm
53
54 #endif // LLVM_LIB_TARGET_X86_X86CALLLOWERING_H