diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-10-24 19:49:43 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-10-24 19:49:43 +0000 |
commit | 4fc4e42dea2547f40d3672ccf473fc2fbbdfc903 (patch) | |
tree | ebcc8d0e10c97409e41a89e296db5aca2f0ce7fc /llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h | |
parent | c3e0ce8f8527d340c168d7361c1c59d8df544ecb (diff) | |
download | bcm5719-llvm-4fc4e42dea2547f40d3672ccf473fc2fbbdfc903.tar.gz bcm5719-llvm-4fc4e42dea2547f40d3672ccf473fc2fbbdfc903.zip |
[WebAssembly] Add an option to make get_local/set_local explicit.
This patch adds a pass, controlled by an option and off by default for
now, for making implicit get_local/set_local explicit. This simplifies
emitting wasm with MC.
Differential Revision: https://reviews.llvm.org/D25836
llvm-svn: 285009
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h index 86693a933ec..61382cd0640 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h +++ b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h @@ -64,6 +64,7 @@ class WebAssemblyFunctionInfo final : public MachineFunctionInfo { static const unsigned UnusedReg = -1u; void stackifyVReg(unsigned VReg) { + assert(MF.getRegInfo().getUniqueVRegDef(VReg)); if (TargetRegisterInfo::virtReg2Index(VReg) >= VRegStackified.size()) VRegStackified.resize(TargetRegisterInfo::virtReg2Index(VReg) + 1); VRegStackified.set(TargetRegisterInfo::virtReg2Index(VReg)); |