aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-11-13 00:21:05 +0000
committerDan Gohman <dan433584@gmail.com>2015-11-13 00:21:05 +0000
commit058fce5435464631a40cd8e92e347296c49eb46a (patch)
treef805bc42d5b206e2864c87625d010aa1189b70e2 /llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
parentcbc56baae6bf7cd948a4fe101290b849797b5dad (diff)
downloadllvm-058fce5435464631a40cd8e92e347296c49eb46a.zip
llvm-058fce5435464631a40cd8e92e347296c49eb46a.tar.gz
llvm-058fce5435464631a40cd8e92e347296c49eb46a.tar.bz2
[WebAssembly] Introduce a new pseudo-operand for unused expression results.
llvm-svn: 252975
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
index 542d984..225c5d3 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
@@ -17,3 +17,9 @@
using namespace llvm;
WebAssemblyFunctionInfo::~WebAssemblyFunctionInfo() {}
+
+void WebAssemblyFunctionInfo::initWARegs() {
+ assert(WARegs.empty());
+ unsigned Reg = UnusedReg;
+ WARegs.resize(MF.getRegInfo().getNumVirtRegs(), Reg);
+}