summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2015-07-10 18:23:10 +0000
committerJF Bastien <jfb@google.com>2015-07-10 18:23:10 +0000
commit5ca0baca4a3b03eb5d8a2303bd0fb67b9d19bef7 (patch)
treedcceee28eaa2fc083595eb237bec12306f923b82 /llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h
parentf6bc8667cd05c9a9f8d2eedbb23faf6c6b8d443f (diff)
downloadbcm5719-llvm-5ca0baca4a3b03eb5d8a2303bd0fb67b9d19bef7.tar.gz
bcm5719-llvm-5ca0baca4a3b03eb5d8a2303bd0fb67b9d19bef7.zip
WebAssembly: basic instructions todo, and basic register info.
Summary: This code is based on AArch64 for modern backend good practice, and NVPTX for virtual ISA concerns. Reviewers: sunfish Subscribers: aemerson, llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11070 llvm-svn: 241923
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h
index 55300287a51..dbdb9d0457a 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h
@@ -16,6 +16,9 @@
#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H
#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H
+#define GET_REGINFO_HEADER
+#include "WebAssemblyGenRegisterInfo.inc"
+
namespace llvm {
class MachineFunction;
@@ -23,11 +26,25 @@ class RegScavenger;
class TargetRegisterClass;
class Triple;
-class WebAssemblyRegisterInfo final {
+class WebAssemblyRegisterInfo final : public WebAssemblyGenRegisterInfo {
const Triple &TT;
public:
explicit WebAssemblyRegisterInfo(const Triple &TT);
+
+ // Code Generation virtual methods.
+ const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
+ BitVector getReservedRegs(const MachineFunction &MF) const override;
+ void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
+ unsigned FIOperandNum,
+ RegScavenger *RS = nullptr) const override;
+
+ // Debug information queries.
+ unsigned getFrameRegister(const MachineFunction &MF) const override;
+
+ // Base pointer (stack realignment) support.
+ bool canRealignStack(const MachineFunction &MF) const;
+ bool needsStackRealignment(const MachineFunction &MF) const override;
};
} // end namespace llvm
OpenPOWER on IntegriCloud