summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2015-10-17 00:25:38 +0000
committerJF Bastien <jfb@google.com>2015-10-17 00:25:38 +0000
commit3428ed4f533764fda97d9199a93bdee510cbbeb4 (patch)
tree775e25e696392cd21c6de8b4eff71e2cface5f63 /llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
parentfb2eec7e11f146985bc2b27208973071acefedd9 (diff)
downloadbcm5719-llvm-3428ed4f533764fda97d9199a93bdee510cbbeb4.tar.gz
bcm5719-llvm-3428ed4f533764fda97d9199a93bdee510cbbeb4.zip
WebAssembly: don't omit dead vregs from locals
Summary: This is a temporary hack until we get around to remapping the vreg numbers to local numbers. Dead vregs cause bad numbering and make consumers sad. We could also just look at debug info an use named locals instead, but vregs have to work properly anyways so there! Reviewers: binji, sunfish Subscribers: jfb, llvm-commits, dschuff Differential Revision: http://reviews.llvm.org/D13839 llvm-svn: 250594
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
index 5c8fe570847..fda95a5e6a5 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
@@ -226,14 +226,16 @@ void WebAssemblyAsmPrinter::EmitFunctionBodyStart() {
bool FirstVReg = true;
for (unsigned Idx = 0, IdxE = MRI->getNumVirtRegs(); Idx != IdxE; ++Idx) {
unsigned VReg = TargetRegisterInfo::index2VirtReg(Idx);
- if (!MRI->use_empty(VReg)) {
+ // FIXME: Don't skip dead virtual registers for now: that would require
+ // remapping all locals' numbers.
+ //if (!MRI->use_empty(VReg)) {
if (FirstVReg) {
OS << (First ? "" : "\n") << "\t.local ";
First = false;
}
OS << (FirstVReg ? "" : ", ") << getRegTypeName(VReg);
FirstVReg = false;
- }
+ //}
}
if (!First)
OpenPOWER on IntegriCloud