[ARM] MVE integer min and max
[llvm-complete.git] / lib / Target / X86 / X86CallLowering.h
blob0445331bc3ff24a8136cb0f7e7c62e9816a3e88b
1 //===- llvm/lib/Target/X86/X86CallLowering.h - Call lowering ----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// This file describes how to lower LLVM calls to machine code calls.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
15 #define LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
17 #include "llvm/ADT/ArrayRef.h"
18 #include "llvm/CodeGen/GlobalISel/CallLowering.h"
19 #include <functional>
21 namespace llvm {
23 class DataLayout;
24 class MachineRegisterInfo;
25 class X86TargetLowering;
27 class X86CallLowering : public CallLowering {
28 public:
29 X86CallLowering(const X86TargetLowering &TLI);
31 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
32 ArrayRef<Register> VRegs) const override;
34 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
35 ArrayRef<ArrayRef<Register>> VRegs) const override;
37 bool lowerCall(MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv,
38 const MachineOperand &Callee, const ArgInfo &OrigRet,
39 ArrayRef<ArgInfo> OrigArgs) const override;
41 private:
42 /// A function of this type is used to perform value split action.
43 using SplitArgTy = std::function<void(ArrayRef<Register>)>;
45 bool splitToValueTypes(const ArgInfo &OrigArgInfo,
46 SmallVectorImpl<ArgInfo> &SplitArgs,
47 const DataLayout &DL, MachineRegisterInfo &MRI,
48 SplitArgTy SplitArg) const;
51 } // end namespace llvm
53 #endif // LLVM_LIB_TARGET_X86_X86CALLLOWERING_H