Path: blob/main/contrib/llvm-project/llvm/lib/Target/Lanai/LanaiFrameLowering.h
35271 views
//===-- LanaiFrameLowering.h - Define frame lowering for Lanai --*- C++-*--===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This class implements Lanai-specific bits of TargetFrameLowering class.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_LANAI_LANAIFRAMELOWERING_H13#define LLVM_LIB_TARGET_LANAI_LANAIFRAMELOWERING_H1415#include "llvm/CodeGen/TargetFrameLowering.h"1617namespace llvm {1819class BitVector;20class LanaiSubtarget;2122class LanaiFrameLowering : public TargetFrameLowering {23private:24void determineFrameLayout(MachineFunction &MF) const;25void replaceAdjDynAllocPseudo(MachineFunction &MF) const;2627protected:28const LanaiSubtarget &STI;2930public:31explicit LanaiFrameLowering(const LanaiSubtarget &Subtarget)32: TargetFrameLowering(StackGrowsDown,33/*StackAlignment=*/Align(8),34/*LocalAreaOffset=*/0),35STI(Subtarget) {}3637// emitProlog/emitEpilog - These methods insert prolog and epilog code into38// the function.39void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;40void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;4142MachineBasicBlock::iterator43eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,44MachineBasicBlock::iterator I) const override;4546bool hasFP(const MachineFunction & /*MF*/) const override { return true; }4748void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,49RegScavenger *RS = nullptr) const override;50};5152} // namespace llvm5354#endif // LLVM_LIB_TARGET_LANAI_LANAIFRAMELOWERING_H555657