LLVM  8.0.1
X86CallLowering.h
Go to the documentation of this file.
1 //===- llvm/lib/Target/X86/X86CallLowering.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_X86_X86CALLLOWERING_H
16 #define LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
17 
18 #include "llvm/ADT/ArrayRef.h"
20 #include <functional>
21 
22 namespace llvm {
23 
24 class DataLayout;
25 class MachineRegisterInfo;
26 class X86TargetLowering;
27 
28 class X86CallLowering : public CallLowering {
29 public:
31 
32  bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
33  ArrayRef<unsigned> VRegs) const override;
34 
35  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
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,
49  SplitArgTy SplitArg) const;
50 };
51 
52 } // end namespace llvm
53 
54 #endif // LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:111
This class represents lattice values for constants.
Definition: AllocatorList.h:24
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...
F(f)
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...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:42
amdgpu Simplify well known AMD library false Value * Callee
unsigned const MachineRegisterInfo * MRI
Helper class to build MachineInstr.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< unsigned > VRegs) const override
This hook must be implemented to lower outgoing return values, described by Val, into the specified v...
LLVM Value Representation.
Definition: Value.h:73
This file describes how to lower LLVM calls to machine code calls.
X86CallLowering(const X86TargetLowering &TLI)