Mercurial > hg > CbC > CbC_llvm
comparison lib/Target/X86/X86CallLowering.h @ 148:63bd29f05246
merged
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Aug 2019 19:46:37 +0900 |
parents | c2174574ed3a |
children |
comparison
equal
deleted
inserted
replaced
146:3fc4d5c3e21e | 148:63bd29f05246 |
---|---|
1 //===- llvm/lib/Target/X86/X86CallLowering.h - Call lowering ----*- C++ -*-===// | 1 //===- llvm/lib/Target/X86/X86CallLowering.h - Call lowering ----*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 // | 4 // See https://llvm.org/LICENSE.txt for license information. |
5 // This file is distributed under the University of Illinois Open Source | 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 // License. See LICENSE.TXT for details. | |
7 // | 6 // |
8 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
9 // | 8 // |
10 /// \file | 9 /// \file |
11 /// This file describes how to lower LLVM calls to machine code calls. | 10 /// This file describes how to lower LLVM calls to machine code calls. |
27 | 26 |
28 class X86CallLowering : public CallLowering { | 27 class X86CallLowering : public CallLowering { |
29 public: | 28 public: |
30 X86CallLowering(const X86TargetLowering &TLI); | 29 X86CallLowering(const X86TargetLowering &TLI); |
31 | 30 |
32 bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val, | 31 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, |
33 unsigned VReg) const override; | 32 ArrayRef<Register> VRegs) const override; |
34 | 33 |
35 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, | 34 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, |
36 ArrayRef<unsigned> VRegs) const override; | 35 ArrayRef<ArrayRef<Register>> VRegs) const override; |
37 | 36 |
38 bool lowerCall(MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv, | 37 bool lowerCall(MachineIRBuilder &MIRBuilder, |
39 const MachineOperand &Callee, const ArgInfo &OrigRet, | 38 CallLoweringInfo &Info) const override; |
40 ArrayRef<ArgInfo> OrigArgs) const override; | |
41 | 39 |
42 private: | 40 private: |
43 /// A function of this type is used to perform value split action. | 41 /// A function of this type is used to perform value split action. |
44 using SplitArgTy = std::function<void(ArrayRef<unsigned>)>; | 42 using SplitArgTy = std::function<void(ArrayRef<Register>)>; |
45 | 43 |
46 bool splitToValueTypes(const ArgInfo &OrigArgInfo, | 44 bool splitToValueTypes(const ArgInfo &OrigArgInfo, |
47 SmallVectorImpl<ArgInfo> &SplitArgs, | 45 SmallVectorImpl<ArgInfo> &SplitArgs, |
48 const DataLayout &DL, MachineRegisterInfo &MRI, | 46 const DataLayout &DL, MachineRegisterInfo &MRI, |
49 SplitArgTy SplitArg) const; | 47 SplitArgTy SplitArg) const; |