LLVM  3.7.0
WebAssemblyFrameLowering.h
Go to the documentation of this file.
1 // WebAssemblyFrameLowering.h - TargetFrameLowering for WebAssembly -*- C++ -*-/
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// \brief This class implements WebAssembly-specific bits of
12 /// TargetFrameLowering class.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYFRAMELOWERING_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYFRAMELOWERING_H
18 
20 
21 namespace llvm {
22 
24 public:
26  : TargetFrameLowering(StackGrowsDown, /*StackAlignment=*/16,
27  /*LocalAreaOffset=*/0,
28  /*TransientStackAlignment=*/16,
29  /*StackRealignable=*/true) {}
30 
31  void
33  MachineBasicBlock::iterator I) const override;
34 
35  /// These methods insert prolog and epilog code into the function.
36  void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
37  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
38 
39  bool hasFP(const MachineFunction &MF) const override;
40  bool hasReservedCallFrame(const MachineFunction &MF) const override;
41 
43  RegScavenger *RS) const override;
44 };
45 
46 } // end namespace llvm
47 
48 #endif
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
These methods insert prolog and epilog code into the function.
bool hasFP(const MachineFunction &MF) const override
Return true if the specified function should have a dedicated frame pointer register.
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
#define true
Definition: ConvertUTF.c:66
void processFunctionBeforeCalleeSavedScan(MachineFunction &MF, RegScavenger *RS) const override
bundle_iterator - MachineBasicBlock iterator that automatically skips over MIs that are inside bundle...
Information about stack frame layout on the target.
void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
eliminateCallFramePseudoInstr - This method is called during prolog/epilog code insertion to eliminat...
#define I(x, y, z)
Definition: MD5.cpp:54
bool hasReservedCallFrame(const MachineFunction &MF) const override
Under normal circumstances, when a frame pointer is not required, we reserve argument space for call ...