[WebAssembly] Enable register coloring and register stackifying.
This also takes the push/pop syntax another step forward, introducing stack
slot numbers to make it easier to see how expressions are connected. For
example, the value pushed in $push7 is popped in $pop7.
And, this begins an experiment with making get_local and set_local implicit
when an operation directly uses or defines a register. This greatly reduces
clutter. If this experiment succeeds, it may make sense to do this for
const instructions as well.
And, this introduces more special code for ARGUMENTS; hopefully this code
will soon be obviated by proper support for live-in virtual registers.
llvm-svn: 253465
diff --git a/llvm/test/CodeGen/WebAssembly/inline-asm.ll b/llvm/test/CodeGen/WebAssembly/inline-asm.ll
index 5dcd436..4db3c2a 100644
--- a/llvm/test/CodeGen/WebAssembly/inline-asm.ll
+++ b/llvm/test/CodeGen/WebAssembly/inline-asm.ll
@@ -8,11 +8,10 @@
; CHECK-LABEL: foo:
; CHECK-NEXT: .param i32{{$}}
; CHECK-NEXT: .result i32{{$}}
-; CHECK-NEXT: .local i32, i32{{$}}
; CHECK-NEXT: #APP{{$}}
-; CHECK-NEXT: 1 = aaa(0){{$}}
+; CHECK-NEXT: $0 = aaa($0){{$}}
; CHECK-NEXT: #NO_APP{{$}}
-; CHECK-NEXT: return (get_local 1){{$}}
+; CHECK-NEXT: return $0{{$}}
define i32 @foo(i32 %r) {
entry:
%0 = tail call i32 asm sideeffect "$0 = aaa($1)", "=r,r"(i32 %r) #0, !srcloc !0
@@ -22,9 +21,8 @@
; CHECK-LABEL: bar:
; CHECK-NEXT: .param i32{{$}}
; CHECK-NEXT: .param i32{{$}}
-; CHECK-NEXT: .local i32, i32{{$}}
; CHECK-NEXT: #APP{{$}}
-; CHECK-NEXT: 1 = bbb(0){{$}}
+; CHECK-NEXT: $1 = bbb($0){{$}}
; CHECK-NEXT: #NO_APP{{$}}
; CHECK-NEXT: return{{$}}
define void @bar(i32* %r, i32* %s) {
@@ -37,9 +35,9 @@
; CHECK-NEXT: .result i32{{$}}
; CHECK-NEXT: .local i32{{$}}
; CHECK-NEXT: #APP{{$}}
-; CHECK-NEXT: 0 = ccc(42){{$}}
+; CHECK-NEXT: $0 = ccc(42){{$}}
; CHECK-NEXT: #NO_APP{{$}}
-; CHECK-NEXT: return (get_local 0){{$}}
+; CHECK-NEXT: return $0{{$}}
define i32 @imm() {
entry:
%0 = tail call i32 asm sideeffect "$0 = ccc($1)", "=r,i"(i32 42) #0, !srcloc !2