LLVM 24.0.0git
ARCFrameLowering.h
Go to the documentation of this file.
1//===- ARCFrameLowering.h - Define frame lowering for ARC -------*- 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// This class implements the ARC specific frame lowering.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_ARC_ARCFRAMELOWERING_H
14#define LLVM_LIB_TARGET_ARC_ARCFRAMELOWERING_H
15
16#include "ARC.h"
20
21namespace llvm {
22
23class MachineFunction;
24class ARCSubtarget;
25
27public:
31
32 /// Insert Prologue into the function.
33 void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
34
35 /// Insert Epilogue into the function.
36 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
37
38 /// Add explicit callee save registers.
40 RegScavenger *RS) const override;
41
45 const TargetRegisterInfo *TRI) const override;
46
47 bool
51 const TargetRegisterInfo *TRI) const override;
52
54 RegScavenger *RS) const override;
55
58 MachineBasicBlock::iterator I) const override;
59
62 std::vector<llvm::CalleeSavedInfo> &) const override;
63
64protected:
65 bool hasFPImpl(const MachineFunction &MF) const override;
66
67private:
68 void adjustStackToMatchRecords(MachineBasicBlock &MBB,
70 bool allocate) const;
71
72 const ARCSubtarget &ST;
73};
74
75} // end namespace llvm
76
77#endif // LLVM_LIB_TARGET_ARC_ARCFRAMELOWERING_H
MachineBasicBlock & MBB
IRTranslator LLVM IR MI
#define I(x, y, z)
Definition MD5.cpp:57
Register const TargetRegisterInfo * TRI
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS) const override
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function...
bool hasFPImpl(const MachineFunction &MF) const override
MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...
ARCFrameLowering(const ARCSubtarget &st)
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const override
Add explicit callee save registers.
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Insert Prologue into the function.
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Insert Epilogue into the function.
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
bool assignCalleeSavedSpillSlots(llvm::MachineFunction &, const llvm::TargetRegisterInfo *, std::vector< llvm::CalleeSavedInfo > &) const override
assignCalleeSavedSpillSlots - Allows target to override spill slot assignment logic.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
MachineInstrBundleIterator< MachineInstr > iterator
Represent a mutable reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:294
TargetFrameLowering(StackDirection D, Align StackAl, int LAO, Align TransAl=Align(1), bool StackReal=true)
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39