X86CallLowering.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
  14. #define LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
  15. #include "llvm/CodeGen/GlobalISel/CallLowering.h"
  16. #include <functional>
  17. namespace llvm {
  18. template <typename T> class ArrayRef;
  19. class X86TargetLowering;
  20. class X86CallLowering : public CallLowering {
  21. public:
  22. X86CallLowering(const X86TargetLowering &TLI);
  23. bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
  24. ArrayRef<Register> VRegs,
  25. FunctionLoweringInfo &FLI) const override;
  26. bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
  27. ArrayRef<ArrayRef<Register>> VRegs,
  28. FunctionLoweringInfo &FLI) const override;
  29. bool lowerCall(MachineIRBuilder &MIRBuilder,
  30. CallLoweringInfo &Info) const override;
  31. bool canLowerReturn(MachineFunction &MF, CallingConv::ID CallConv,
  32. SmallVectorImpl<BaseArgInfo> &Outs,
  33. bool IsVarArg) const override;
  34. };
  35. } // end namespace llvm
  36. #endif // LLVM_LIB_TARGET_X86_X86CALLLOWERING_H