aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
index c774c12..e31ea46 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
@@ -165,12 +165,6 @@ void WebAssemblyPassConfig::addPreRegAlloc() {
// Prepare store instructions for register stackifying.
addPass(createWebAssemblyStoreResults());
-
- // 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() {
@@ -184,6 +178,9 @@ void WebAssemblyPassConfig::addPostRegAlloc() {
// Fails with: should be run after register allocation.
disablePass(&MachineCopyPropagationID);
+ // Mark registers as representing wasm's expression stack.
+ addPass(createWebAssemblyRegStackify());
+
// Run the register coloring pass to reduce the total number of registers.
addPass(createWebAssemblyRegColoring());