[WebAssembly] replaced .param/.result by .functype

Summary:
This makes it easier/cleaner to generate a single signature from
this directive. Also:
- Adds the symbol name, such that we don't depend on the location
  of this directive anymore.
- Actually constructs the signature in the assembler, and make the
  assembler own it.
- Refactor the use of MVT vs ValType in the streamer and assembler
  to require less conversions overall.
- Changed 700 or so tests to use it.

Reviewers: sbc100, dschuff

Subscribers: jgravelle-google, eraman, aheejin, sunfish, jfb, llvm-commits

Differential Revision: https://reviews.llvm.org/D54652

llvm-svn: 347228
diff --git a/llvm/test/CodeGen/WebAssembly/fast-isel-i256.ll b/llvm/test/CodeGen/WebAssembly/fast-isel-i256.ll
index b4cb735..a916a87 100644
--- a/llvm/test/CodeGen/WebAssembly/fast-isel-i256.ll
+++ b/llvm/test/CodeGen/WebAssembly/fast-isel-i256.ll
@@ -8,7 +8,7 @@
 target triple = "wasm32-unknown-unknown"
 
 ; CHECK-LABEL: add:
-; CHECK-NEXT: .param      i32, i64, i64, i64, i64, i64, i64, i64, i64{{$}}
+; CHECK-NEXT: .functype add (i32, i64, i64, i64, i64, i64, i64, i64, i64) -> (){{$}}
 ; CHECK-NOT:  .result
 ; CHECK: end_function
 define i256 @add(i256 %x, i256 %y) {
@@ -17,16 +17,14 @@
 }
 
 ; CHECK-LABEL: return_zero:
-; CHECK-NEXT: .param      i32{{$}}
-; CHECK-NOT: .result
+; CHECK-NEXT: .functype return_zero (i32) -> (){{$}}
 ; CHECK: end_function
 define i256 @return_zero() {
     ret i256 0
 }
 
 ; CHECK-LABEL: return_zero_with_params:
-; CHECK-NEXT: .param      i32, f32{{$}}
-; CHECK-NOT: .result
+; CHECK-NEXT: .functype return_zero_with_params (i32, f32) -> (){{$}}
 ; CHECK: end_function
 define i256 @return_zero_with_params(float %x) {
     ret i256 0