ARMCallLowering.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //===- llvm/lib/Target/ARM/ARMCallLowering.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_ARM_ARMCALLLOWERING_H
  14. #define LLVM_LIB_TARGET_ARM_ARMCALLLOWERING_H
  15. #include "llvm/ADT/ArrayRef.h"
  16. #include "llvm/CodeGen/GlobalISel/CallLowering.h"
  17. #include "llvm/IR/CallingConv.h"
  18. #include <cstdint>
  19. #include <functional>
  20. namespace llvm {
  21. class ARMTargetLowering;
  22. class MachineInstrBuilder;
  23. class MachineIRBuilder;
  24. class Value;
  25. class ARMCallLowering : public CallLowering {
  26. public:
  27. ARMCallLowering(const ARMTargetLowering &TLI);
  28. bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
  29. ArrayRef<Register> VRegs,
  30. FunctionLoweringInfo &FLI) const override;
  31. bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
  32. ArrayRef<ArrayRef<Register>> VRegs,
  33. FunctionLoweringInfo &FLI) const override;
  34. bool lowerCall(MachineIRBuilder &MIRBuilder,
  35. CallLoweringInfo &Info) const override;
  36. private:
  37. bool lowerReturnVal(MachineIRBuilder &MIRBuilder, const Value *Val,
  38. ArrayRef<Register> VRegs,
  39. MachineInstrBuilder &Ret) const;
  40. };
  41. } // end namespace llvm
  42. #endif // LLVM_LIB_TARGET_ARM_ARMCALLLOWERING_H