[WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.
authorDan Gohman <dan433584@gmail.com>
Fri, 25 Dec 2015 00:31:02 +0000 (00:31 +0000)
committerDan Gohman <dan433584@gmail.com>
Fri, 25 Dec 2015 00:31:02 +0000 (00:31 +0000)
commit005cc9c500af4fc7a3dbaa61439dd5bf8c0471cf
treebac154a3316011b7fde51bf4fdab0df4d905b9f1
parent75759ab3e9255fe5f716e4a71ca1ee56901dedf8
[WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.

Move RegStackify after coalescing and teach it to use LiveIntervals instead
of depending on SSA form. This avoids a problem where a register in a COPY
instruction is stackified and then subsequently coalesced with a register
that is not stackified.

This also puts it after the scheduler, which allows us to simplify the
EXPR_STACK constraint, as we no longer have instructions being reordered
after stackification and before coloring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256402 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
lib/Target/WebAssembly/WebAssemblyInstrControl.td
lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
test/CodeGen/WebAssembly/cfg-stackify.ll
test/CodeGen/WebAssembly/reg-stackify.ll