From 8bb5f2927a36d1ec58b5fa090095ed0abfa5d1c6 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 16 Dec 2015 23:21:30 +0000 Subject: [WebAssembly] Implement eliminateCallFramePseudo Summary: Implement eliminateCallFramePsuedo to handle ADJCALLSTACKUP/DOWN pseudo-instructions. Add a test calling a vararg function which causes non-0 adjustments. This revealed an issue with RegisterCoalescer wherein it eliminates a COPY from SP32 to a vreg but failes to update the live ranges of EXPR_STACK, causing a machineinstr verifier failure (so this test is commented out). Also add a dynamic alloca test, which causes a callseq_end dag node with a 0 (instead of undef) second argument to be generated. We currently fail to select that, so adjust the ADJCALLSTACKUP tablegen code to handle it. Differential Revision: http://reviews.llvm.org/D15587 llvm-svn: 255844 --- llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp') diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index dcc393db6ea..c33c21fe685 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -169,6 +169,9 @@ void WebAssemblyPassConfig::addPreRegAlloc() { // Mark registers as representing wasm's expression stack. addPass(createWebAssemblyRegStackify()); + // The register coalescing pass has a bad interaction with COPY MIs which have + // EXPR_STACK as an extra operand + //disablePass(&RegisterCoalescerID); } void WebAssemblyPassConfig::addPostRegAlloc() { -- cgit v1.2.3