[llvm] 9ac5620 - [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC.

Andy Wingo via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 01:11:17 PDT 2021


Author: Andy Wingo
Date: 2021-03-24T09:10:11+01:00
New Revision: 9ac5620cb8548c0bd0150f0da68219dd3a5a657a

URL: https://github.com/llvm/llvm-project/commit/9ac5620cb8548c0bd0150f0da68219dd3a5a657a
DIFF: https://github.com/llvm/llvm-project/commit/9ac5620cb8548c0bd0150f0da68219dd3a5a657a.diff

LOG: [WebAssembly] Rename WasmLimits::Initial to ::Minimum.  NFC.

This patch renames the "Initial" member of WasmLimits to the name used
in the spec, "Minimum".

In the core WebAssembly specification, the Limits data type has one
required "min" member and one optional "max" member, indicating the
minimum required size of the corresponding table or memory, and the
maximum size, if any.

Although the WebAssembly spec does instantiate locally-defined tables
and memories with the initial size being equal to the minimum size, it
can't impose such a requirement for imports.  It doesn't make sense to
require an initial size for a memory import, for example.  The compiler
can only sensibly express the minimum and maximum sizes.

See
https://github.com/WebAssembly/js-types/blob/master/proposals/js-types/Overview.md#naming-of-size-limits
for a related discussion that agrees that the right name of "initial" is
"minimum" when querying the type of a table or memory from JavaScript.
(Of course it still makes sense for JS to speak in terms of an initial
size when it explicitly instantiates memories and tables.)

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

Added: 
    

Modified: 
    lld/test/wasm/alias.s
    lld/test/wasm/bsymbolic.s
    lld/test/wasm/call-indirect.ll
    lld/test/wasm/data-layout.s
    lld/test/wasm/export-table-explicit.test
    lld/test/wasm/export-table.test
    lld/test/wasm/growable-table.test
    lld/test/wasm/import-memory.test
    lld/test/wasm/import-table.test
    lld/test/wasm/large-memory.test
    lld/test/wasm/local-symbols.ll
    lld/test/wasm/locals-duplicate.test
    lld/test/wasm/multi-table.s
    lld/test/wasm/pie.ll
    lld/test/wasm/relocatable.ll
    lld/test/wasm/responsefile.test
    lld/test/wasm/shared-memory-no-atomics.yaml
    lld/test/wasm/shared-memory.yaml
    lld/test/wasm/shared.ll
    lld/test/wasm/stack-pointer.ll
    lld/test/wasm/undefined-weak-call.s
    lld/test/wasm/weak-alias-overide.ll
    lld/test/wasm/weak-alias.ll
    lld/test/wasm/weak-symbols.s
    lld/test/wasm/weak-undefined.s
    lld/wasm/SyntheticSections.cpp
    lld/wasm/Writer.cpp
    lld/wasm/WriterUtils.cpp
    llvm/include/llvm/BinaryFormat/Wasm.h
    llvm/include/llvm/ObjectYAML/WasmYAML.h
    llvm/lib/MC/WasmObjectWriter.cpp
    llvm/lib/Object/WasmObjectFile.cpp
    llvm/lib/ObjectYAML/WasmEmitter.cpp
    llvm/lib/ObjectYAML/WasmYAML.cpp
    llvm/test/CodeGen/WebAssembly/call-indirect.ll
    llvm/test/CodeGen/WebAssembly/function-pointer64.ll
    llvm/test/MC/WebAssembly/assembler-binary.ll
    llvm/test/MC/WebAssembly/call-indirect-relocs.s
    llvm/test/MC/WebAssembly/comdat.ll
    llvm/test/MC/WebAssembly/data-section.s
    llvm/test/MC/WebAssembly/global-ctor-dtor.ll
    llvm/test/MC/WebAssembly/reloc-pic.s
    llvm/test/MC/WebAssembly/tables.s
    llvm/test/MC/WebAssembly/type-index.s
    llvm/test/MC/WebAssembly/wasm64.s
    llvm/test/MC/WebAssembly/weak-alias.s
    llvm/test/Object/wasm-relocs-and-producers.yaml
    llvm/test/ObjectYAML/wasm/data_section.yaml
    llvm/test/ObjectYAML/wasm/elem_section.yaml
    llvm/test/ObjectYAML/wasm/import_memory_shared.yaml
    llvm/test/ObjectYAML/wasm/import_section.yaml
    llvm/test/ObjectYAML/wasm/memory_section.yaml
    llvm/test/ObjectYAML/wasm/multiple-tables.yaml
    llvm/test/ObjectYAML/wasm/table_section.yaml
    llvm/test/tools/llvm-readobj/wasm/wasm-imports.test
    llvm/tools/llvm-readobj/WasmDumper.cpp
    llvm/tools/obj2yaml/wasm2yaml.cpp

Removed: 
    


################################################################################
diff  --git a/lld/test/wasm/alias.s b/lld/test/wasm/alias.s
index b2ab45e98d95..0bb035b92f29 100644
--- a/lld/test/wasm/alias.s
+++ b/lld/test/wasm/alias.s
@@ -24,7 +24,7 @@ _start:
 # CHECK-NEXT:     FunctionTypes:   [ 0 ]
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0

diff  --git a/lld/test/wasm/bsymbolic.s b/lld/test/wasm/bsymbolic.s
index bc2e4e777406..79c4a8700fdd 100644
--- a/lld/test/wasm/bsymbolic.s
+++ b/lld/test/wasm/bsymbolic.s
@@ -14,7 +14,7 @@
 // NOOPTION-NEXT:        Field:           memory
 // NOOPTION-NEXT:        Kind:            MEMORY
 // NOOPTION-NEXT:        Memory:
-// NOOPTION-NEXT:          Initial:         0x1
+// NOOPTION-NEXT:          Minimum:         0x1
 // NOOPTION-NEXT:      - Module:          env
 // NOOPTION-NEXT:        Field:           __memory_base
 // NOOPTION-NEXT:        Kind:            GLOBAL
@@ -56,7 +56,7 @@
 // SYMBOLIC-NEXT:        Field:           memory
 // SYMBOLIC-NEXT:        Kind:            MEMORY
 // SYMBOLIC-NEXT:        Memory:
-// SYMBOLIC-NEXT:          Initial:         0x1
+// SYMBOLIC-NEXT:          Minimum:         0x1
 // SYMBOLIC-NEXT:      - Module:          env
 // SYMBOLIC-NEXT:        Field:           __memory_base
 // SYMBOLIC-NEXT:        Kind:            GLOBAL
@@ -74,7 +74,7 @@
 // SYMBOLIC-NEXT:          Index:           0
 // SYMBOLIC-NEXT:          ElemType:        FUNCREF
 // SYMBOLIC-NEXT:          Limits:
-// SYMBOLIC-NEXT:            Initial:         0x1
+// SYMBOLIC-NEXT:            Minimum:         0x1
 // SYMBOLIC-NEXT:  - Type:            FUNCTION
 
 // SYMBOLIC:       - Type:            GLOBAL

diff  --git a/lld/test/wasm/call-indirect.ll b/lld/test/wasm/call-indirect.ll
index f6d3df4914bf..31e2c7586455 100644
--- a/lld/test/wasm/call-indirect.ll
+++ b/lld/test/wasm/call-indirect.ll
@@ -67,11 +67,11 @@ define void @call_ptr(i64 (i64)* %arg) {
 ; CHECK-NEXT:         ElemType:        FUNCREF
 ; CHECK-NEXT:         Limits:
 ; CHECK-NEXT:           Flags:           [ HAS_MAX ]
-; CHECK-NEXT:           Initial:         0x3
+; CHECK-NEXT:           Minimum:         0x3
 ; CHECK-NEXT:           Maximum:         0x3
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0

diff  --git a/lld/test/wasm/data-layout.s b/lld/test/wasm/data-layout.s
index 72a859b8a0a1..8399e9f43f1a 100644
--- a/lld/test/wasm/data-layout.s
+++ b/lld/test/wasm/data-layout.s
@@ -55,7 +55,7 @@ local_struct_internal_ptr:
 # CHECK:        - Type:            MEMORY
 # CHECK-NEXT:     Memories:
 # CHK64-NEXT:       - Flags:           [ IS_64 ]
-# CHECK-NEXT:         Initial:         0x2
+# CHECK-NEXT:         Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0
@@ -104,7 +104,7 @@ local_struct_internal_ptr:
 # CHECK-MAX:        - Type:            MEMORY
 # CHECK-MAX-NEXT:     Memories:
 # CHECK-MAX-NEXT:       - Flags:           [ HAS_MAX ]
-# CHECK-MAX-NEXT:         Initial:         0x2
+# CHECK-MAX-NEXT:         Minimum:         0x2
 # CHECK-MAX-NEXT:         Maximum:         0x2
 
 # RUN: wasm-ld -no-gc-sections --allow-undefined --no-entry --shared-memory \
@@ -115,7 +115,7 @@ local_struct_internal_ptr:
 # CHECK-SHARED:        - Type:            MEMORY
 # CHECK-SHARED-NEXT:     Memories:
 # CHECK-SHARED-NEXT:       - Flags:           [ HAS_MAX, IS_SHARED ]
-# CHECK-SHARED-NEXT:         Initial:         0x2
+# CHECK-SHARED-NEXT:         Minimum:         0x2
 # CHECK-SHARED-NEXT:         Maximum:         0x2
 
 # XUN: wasm-ld --relocatable -o %t_reloc.wasm %t32.o %t.hello32.o

diff  --git a/lld/test/wasm/export-table-explicit.test b/lld/test/wasm/export-table-explicit.test
index b6f03b99eb60..58f0032ce081 100644
--- a/lld/test/wasm/export-table-explicit.test
+++ b/lld/test/wasm/export-table-explicit.test
@@ -13,7 +13,7 @@
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:           Maximum:         0x1
 # CHECK-NEXT:   - Type:
 

diff  --git a/lld/test/wasm/export-table.test b/lld/test/wasm/export-table.test
index c0cb581e919f..927eccef7ced 100644
--- a/lld/test/wasm/export-table.test
+++ b/lld/test/wasm/export-table.test
@@ -10,7 +10,7 @@
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:           Maximum:         0x1
 # CHECK-NEXT:   - Type:
 # CHECK:        - Type:            EXPORT

diff  --git a/lld/test/wasm/growable-table.test b/lld/test/wasm/growable-table.test
index c5df1c3bc7e0..675974ea45aa 100644
--- a/lld/test/wasm/growable-table.test
+++ b/lld/test/wasm/growable-table.test
@@ -9,7 +9,7 @@
 # CHECK-NEXT:       - Index:           0
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:       0x1
 # CHECK-NEXT:   - Type:
 # CHECK:        - Type:            EXPORT
 # CHECK-NEXT:     Exports:

diff  --git a/lld/test/wasm/import-memory.test b/lld/test/wasm/import-memory.test
index e79775ca7198..dd7066dec005 100644
--- a/lld/test/wasm/import-memory.test
+++ b/lld/test/wasm/import-memory.test
@@ -10,7 +10,7 @@
 # CHECK-NEXT:        Field:           memory
 # CHECK-NEXT:        Kind:            MEMORY
 # CHECK-NEXT:        Memory:
-# CHECK-NEXT:          Initial:         0x2
+# CHECK-NEXT:          Minimum:         0x2
 # CHECK-NEXT:  - Type:
 
 
@@ -28,7 +28,7 @@
 # CHECK-MAX-NEXT:        Kind:            MEMORY
 # CHECK-MAX-NEXT:        Memory:
 # CHECK-MAX-NEXT:          Flags:           [ HAS_MAX ]
-# CHECK-MAX-NEXT:          Initial:         0x4
+# CHECK-MAX-NEXT:          Minimum:         0x4
 # CHECK-MAX-NEXT:          Maximum:         0x5
 # CHECK-MAX-NEXT:  - Type:
 
@@ -45,6 +45,6 @@
 # CHECK-SHARED-NEXT:        Kind:            MEMORY
 # CHECK-SHARED-NEXT:        Memory:
 # CHECK-SHARED-NEXT:          Flags:           [ HAS_MAX, IS_SHARED ]
-# CHECK-SHARED-NEXT:          Initial:         0x4
+# CHECK-SHARED-NEXT:          Minimum:         0x4
 # CHECK-SHARED-NEXT:          Maximum:         0x5
 # CHECK-SHARED-NEXT:  - Type:

diff  --git a/lld/test/wasm/import-table.test b/lld/test/wasm/import-table.test
index 088ff124e8ff..73dc7189bbf2 100644
--- a/lld/test/wasm/import-table.test
+++ b/lld/test/wasm/import-table.test
@@ -21,5 +21,5 @@ require_function_table:
 # CHECK-NEXT:          Index:           0
 # CHECK-NEXT:          ElemType:        FUNCREF
 # CHECK-NEXT:          Limits:
-# CHECK-NEXT:            Initial:         0x1
+# CHECK-NEXT:            Minimum:         0x1
 

diff  --git a/lld/test/wasm/large-memory.test b/lld/test/wasm/large-memory.test
index b82c4afdf1c0..5b737e415496 100644
--- a/lld/test/wasm/large-memory.test
+++ b/lld/test/wasm/large-memory.test
@@ -12,7 +12,7 @@ RUN: obj2yaml %t2.wasm | FileCheck %s --check-prefixes=CHECK,CHECK-4G
 CHECK:      - Type:            MEMORY
 CHECK-NEXT:   Memories:
 CHECK-NEXT:     - Flags:           [ HAS_MAX ]
-CHECK-NEXT:       Initial:         0x2
+CHECK-NEXT:       Minimum:         0x2
 CHECK-2G-NEXT:    Maximum:         0x8000
 CHECK-4G-NEXT:    Maximum:         0x10000
 

diff  --git a/lld/test/wasm/local-symbols.ll b/lld/test/wasm/local-symbols.ll
index 216aced9cf07..f50460304585 100644
--- a/lld/test/wasm/local-symbols.ll
+++ b/lld/test/wasm/local-symbols.ll
@@ -37,7 +37,7 @@ entry:
 ; CHECK-NEXT:     FunctionTypes:   [ 0, 1 ]
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0

diff  --git a/lld/test/wasm/locals-duplicate.test b/lld/test/wasm/locals-duplicate.test
index df76d2f69126..7de8ef15b184 100644
--- a/lld/test/wasm/locals-duplicate.test
+++ b/lld/test/wasm/locals-duplicate.test
@@ -22,11 +22,11 @@
 ; CHECK-NEXT:         ElemType:        FUNCREF
 ; CHECK-NEXT:         Limits:
 ; CHECK-NEXT:           Flags:           [ HAS_MAX ]
-; CHECK-NEXT:           Initial:         0x7
+; CHECK-NEXT:           Minimum:         0x7
 ; CHECK-NEXT:           Maximum:         0x7
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0
@@ -240,13 +240,13 @@
 ; RELOC-NEXT:          Index:           0
 ; RELOC-NEXT:          ElemType:        FUNCREF
 ; RELOC-NEXT:          Limits:
-; RELOC-NEXT:            Initial:         0x7
+; RELOC-NEXT:            Minimum:         0x7
 ; RELOC-NEXT:   - Type:            FUNCTION
 ; RELOC-NEXT:     FunctionTypes:   [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 ; RELOC-NEXT:                        0, 0 ]
 ; RELOC-NEXT:   - Type:            MEMORY
 ; RELOC-NEXT:     Memories:
-; RELOC-NEXT:       - Initial:         0x1
+; RELOC-NEXT:       - Minimum:         0x1
 ; RELOC-NEXT:   - Type:            ELEM
 ; RELOC-NEXT:     Segments:
 ; RELOC-NEXT:       - Offset:

diff  --git a/lld/test/wasm/multi-table.s b/lld/test/wasm/multi-table.s
index 2fdbf2547da5..bf905ac748f9 100644
--- a/lld/test/wasm/multi-table.s
+++ b/lld/test/wasm/multi-table.s
@@ -54,7 +54,7 @@ call_indirect_explicit_tables:
 # CHECK-NEXT:           Index:           0
 # CHECK-NEXT:           ElemType:        FUNCREF
 # CHECK-NEXT:           Limits:
-# CHECK-NEXT:             Initial:         0x0
+# CHECK-NEXT:             Minimum:         0x0
 # CHECK-NEXT:       - Module:          env
 # CHECK-NEXT:         Field:           foo
 # CHECK-NEXT:         Kind:            FUNCTION
@@ -66,20 +66,20 @@ call_indirect_explicit_tables:
 # CHECK-NEXT:       - Index:           1
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
-# CHECK-NEXT:           Initial:         0x0
+# CHECK-NEXT:           Minimum:         0x0
 # CHECK-NEXT:       - Index:           2
 # CHECK-NEXT:         ElemType:        EXTERNREF
 # CHECK-NEXT:         Limits:
-# CHECK-NEXT:           Initial:         0x0
+# CHECK-NEXT:           Minimum:         0x0
 # CHECK-NEXT:       - Index:           3
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x3
+# CHECK-NEXT:           Minimum:         0x3
 # CHECK-NEXT:           Maximum:         0x3
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0

diff  --git a/lld/test/wasm/pie.ll b/lld/test/wasm/pie.ll
index 1aca4df3a594..03e2c6cee1ce 100644
--- a/lld/test/wasm/pie.ll
+++ b/lld/test/wasm/pie.ll
@@ -62,7 +62,7 @@ define void @_start() {
 ; CHECK-NEXT:           Index:           0
 ; CHECK-NEXT:           ElemType:        FUNCREF
 ; CHECK-NEXT:           Limits:
-; CHECK-NEXT:             Initial:         0x1
+; CHECK-NEXT:             Minimum:         0x1
 
 ; CHECK:        - Type:            START
 ; CHECK-NEXT:     StartFunction:   2

diff  --git a/lld/test/wasm/relocatable.ll b/lld/test/wasm/relocatable.ll
index b011813984dc..c71a9c2f9c61 100644
--- a/lld/test/wasm/relocatable.ll
+++ b/lld/test/wasm/relocatable.ll
@@ -66,7 +66,7 @@ define void @_start() {
 ; CHECK-NEXT:           Index:           0
 ; CHECK-NEXT:           ElemType:        FUNCREF
 ; CHECK-NEXT:           Limits:
-; CHECK-NEXT:             Initial:         0x4
+; CHECK-NEXT:             Minimum:         0x4
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           puts
 ; CHECK-NEXT:         Kind:            FUNCTION
@@ -83,7 +83,7 @@ define void @_start() {
 ; CHECK-NEXT:     FunctionTypes:   [ 2, 1, 1, 2 ]
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:      - Initial:         0x1
+; CHECK-NEXT:      - Minimum:         0x1
 ; CHECK-NEXT:   - Type:            ELEM
 ; CHECK-NEXT:     Segments:
 ; CHECK-NEXT:       - Offset:

diff  --git a/lld/test/wasm/responsefile.test b/lld/test/wasm/responsefile.test
index 36209d48edda..47345175dc23 100644
--- a/lld/test/wasm/responsefile.test
+++ b/lld/test/wasm/responsefile.test
@@ -3,7 +3,7 @@ RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %
 RUN: echo "%/t.o -o %/t.wasm -e ret32" > %t.rsp
 RUN: wasm-ld @%t.rsp --initial-memory=655360
 RUN: llvm-readobj --sections %t.wasm | FileCheck %s
-CHECK: InitialPages: 10
+CHECK: MinPages: 10
 
 RUN: not wasm-ld --rsp-quoting=foobar @%t.rsp 2>&1 | \
 RUN:     FileCheck --check-prefix=INVRSP %s

diff  --git a/lld/test/wasm/shared-memory-no-atomics.yaml b/lld/test/wasm/shared-memory-no-atomics.yaml
index e303e39625f2..942c69053a4b 100644
--- a/lld/test/wasm/shared-memory-no-atomics.yaml
+++ b/lld/test/wasm/shared-memory-no-atomics.yaml
@@ -14,7 +14,7 @@ Sections:
         Field:           __linear_memory
         Kind:            MEMORY
         Memory:
-          Initial:         0x00000001
+          Minimum:         0x00000001
       - Module:          env
         Field:           __indirect_function_table
         Kind:            TABLE
@@ -22,7 +22,7 @@ Sections:
           Index:           0
           ElemType:        FUNCREF
           Limits:
-            Initial:         0x00000000
+            Minimum:         0x00000000
   - Type:            DATA
     Segments:
       - SectionOffset:   6
@@ -55,7 +55,7 @@ Sections:
 
 # NO-SHARED:      - Type:            MEMORY
 # NO-SHARED-NEXT:   Memories:
-# NO-SHARED-NEXT:     - Initial:         0x2
+# NO-SHARED-NEXT:     - Minimum:         0x2
 # NO-SHARED-NOT:        Maximum:
 
 # SHARED: --shared-memory is disallowed by {{.*}}shared-memory-no-atomics.yaml.tmp1.o because it was not compiled with 'atomics' or 'bulk-memory' features.

diff  --git a/lld/test/wasm/shared-memory.yaml b/lld/test/wasm/shared-memory.yaml
index 8710a06db3f7..f10ac6ad5319 100644
--- a/lld/test/wasm/shared-memory.yaml
+++ b/lld/test/wasm/shared-memory.yaml
@@ -22,7 +22,7 @@ Sections:
         Field:           __linear_memory
         Kind:            MEMORY
         Memory:
-          Initial:         0x00000001
+          Minimum:         0x00000001
       - Module:          env
         Field:           __indirect_function_table
         Kind:            TABLE
@@ -30,7 +30,7 @@ Sections:
           Index:           0
           ElemType:        FUNCREF
           Limits:
-            Initial:         0x00000000
+            Minimum:         0x00000000
   - Type:            DATA
     Segments:
       - SectionOffset:   6
@@ -64,11 +64,11 @@ Sections:
 
 # ATOMICS-RELOCATABLE:        - Type:            MEMORY
 # ATOMICS-RELOCATABLE-NEXT:     Memories:
-# ATOMICS-RELOCATABLE-NEXT:         Initial:         0x1
+# ATOMICS-RELOCATABLE-NEXT:         Minimum:         0x1
 # ATOMICS-RELOCATABLE-NEXT:   - Type:
 
 # SHARED:        - Type:            MEMORY
 # SHARED-NEXT:     Memories:
 # SHARED-NEXT:       - Flags:           [ HAS_MAX, IS_SHARED ]
-# SHARED-NEXT:         Initial:         0x2
+# SHARED-NEXT:         Minimum:         0x2
 # SHARED-NEXT:         Maximum:         0x2

diff  --git a/lld/test/wasm/shared.ll b/lld/test/wasm/shared.ll
index ecfc0e3062af..5cf49fb50bf4 100644
--- a/lld/test/wasm/shared.ll
+++ b/lld/test/wasm/shared.ll
@@ -67,7 +67,7 @@ declare void @func_external()
 ; CHECK-NEXT:         Field:           memory
 ; CHECK-NEXT:         Kind:            MEMORY
 ; CHECK-NEXT:         Memory:
-; CHECK-NEXT:           Initial:       0x1
+; CHECK-NEXT:           Minimum:       0x1
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           __indirect_function_table
 ; CHECK-NEXT:         Kind:            TABLE
@@ -75,7 +75,7 @@ declare void @func_external()
 ; CHECK-NEXT:           Index:           0
 ; CHECK-NEXT:           ElemType:        FUNCREF
 ; CHECK-NEXT:           Limits:
-; CHECK-NEXT:             Initial:         0x2
+; CHECK-NEXT:             Minimum:         0x2
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           __stack_pointer
 ; CHECK-NEXT:         Kind:            GLOBAL

diff  --git a/lld/test/wasm/stack-pointer.ll b/lld/test/wasm/stack-pointer.ll
index 11ab62fab1ae..38693d252ea7 100644
--- a/lld/test/wasm/stack-pointer.ll
+++ b/lld/test/wasm/stack-pointer.ll
@@ -32,7 +32,7 @@ entry:
 ; CHECK-NEXT:     FunctionTypes:   [ 0 ]
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x0
+; CHECK-NEXT:       - Minimum:         0x0
 ; CHECK-NEXT:   - Type:            CODE
 ; CHECK-NEXT:     Relocations:
 ; CHECK-NEXT:       - Type:            R_WASM_GLOBAL_INDEX_LEB

diff  --git a/lld/test/wasm/undefined-weak-call.s b/lld/test/wasm/undefined-weak-call.s
index 0c8abcd387b1..8f50173e9c3e 100644
--- a/lld/test/wasm/undefined-weak-call.s
+++ b/lld/test/wasm/undefined-weak-call.s
@@ -56,11 +56,11 @@ callWeakFuncs:
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:           Maximum:         0x1
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0

diff  --git a/lld/test/wasm/weak-alias-overide.ll b/lld/test/wasm/weak-alias-overide.ll
index 4d47341e2268..fcf229389291 100644
--- a/lld/test/wasm/weak-alias-overide.ll
+++ b/lld/test/wasm/weak-alias-overide.ll
@@ -40,11 +40,11 @@ entry:
 ; CHECK-NEXT:         ElemType:        FUNCREF
 ; CHECK-NEXT:         Limits:
 ; CHECK-NEXT:           Flags:           [ HAS_MAX ]
-; CHECK-NEXT:           Initial:         0x3
+; CHECK-NEXT:           Minimum:         0x3
 ; CHECK-NEXT:           Maximum:         0x3
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0

diff  --git a/lld/test/wasm/weak-alias.ll b/lld/test/wasm/weak-alias.ll
index 8bdeda05dd3e..aa0a271396d1 100644
--- a/lld/test/wasm/weak-alias.ll
+++ b/lld/test/wasm/weak-alias.ll
@@ -37,11 +37,11 @@ entry:
 ; CHECK-NEXT:         ElemType:        FUNCREF
 ; CHECK-NEXT:         Limits:
 ; CHECK-NEXT:           Flags:           [ HAS_MAX ]
-; CHECK-NEXT:           Initial:         0x2
+; CHECK-NEXT:           Minimum:         0x2
 ; CHECK-NEXT:           Maximum:         0x2
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0
@@ -151,7 +151,7 @@ entry:
 ; RELOC-NEXT:           Index:           0
 ; RELOC-NEXT:           ElemType:        FUNCREF
 ; RELOC-NEXT:           Limits:
-; RELOC-NEXT:             Initial:         0x2
+; RELOC-NEXT:             Minimum:         0x2
 ; RELOC-NEXT:       - Module:          env
 ; RELOC-NEXT:         Field:           __stack_pointer
 ; RELOC-NEXT:         Kind:            GLOBAL
@@ -161,7 +161,7 @@ entry:
 ; RELOC-NEXT:     FunctionTypes:   [ 0, 1, 1, 1, 1, 1 ]
 ; RELOC-NEXT:   - Type:            MEMORY
 ; RELOC-NEXT:     Memories:
-; RELOC-NEXT:       - Initial:         0x0
+; RELOC-NEXT:       - Minimum:         0x0
 ; RELOC-NEXT:   - Type:            ELEM
 ; RELOC-NEXT:     Segments:
 ; RELOC-NEXT:       - Offset:

diff  --git a/lld/test/wasm/weak-symbols.s b/lld/test/wasm/weak-symbols.s
index 7557dfb5535b..705b0b920d42 100644
--- a/lld/test/wasm/weak-symbols.s
+++ b/lld/test/wasm/weak-symbols.s
@@ -35,11 +35,11 @@ _start:
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x2
+# CHECK-NEXT:           Minimum:         0x2
 # CHECK-NEXT:           Maximum:         0x2
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0

diff  --git a/lld/test/wasm/weak-undefined.s b/lld/test/wasm/weak-undefined.s
index e7abebb2f8ce..44b0bc11eb65 100644
--- a/lld/test/wasm/weak-undefined.s
+++ b/lld/test/wasm/weak-undefined.s
@@ -54,11 +54,11 @@ _start:
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:           Maximum:         0x1
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0

diff  --git a/lld/wasm/SyntheticSections.cpp b/lld/wasm/SyntheticSections.cpp
index 6c834771b6cb..e4da8dc5f208 100644
--- a/lld/wasm/SyntheticSections.cpp
+++ b/lld/wasm/SyntheticSections.cpp
@@ -131,7 +131,7 @@ void ImportSection::writeBody() {
     import.Field = "memory";
     import.Kind = WASM_EXTERNAL_MEMORY;
     import.Memory.Flags = 0;
-    import.Memory.Initial = out.memorySec->numMemoryPages;
+    import.Memory.Minimum = out.memorySec->numMemoryPages;
     if (out.memorySec->maxMemoryPages != 0 || config->sharedMemory) {
       import.Memory.Flags |= WASM_LIMITS_FLAG_HAS_MAX;
       import.Memory.Maximum = out.memorySec->maxMemoryPages;

diff  --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp
index 63e3dac5d298..3a7104ed920b 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -752,7 +752,7 @@ static void finalizeIndirectFunctionTable() {
   WasmLimits limits = {0, tableSize, 0};
   if (WasmSym::indirectFunctionTable->isDefined() && !config->growableTable) {
     limits.Flags |= WASM_LIMITS_FLAG_HAS_MAX;
-    limits.Maximum = limits.Initial;
+    limits.Maximum = limits.Minimum;
   }
   WasmSym::indirectFunctionTable->setLimits(limits);
 }

diff  --git a/lld/wasm/WriterUtils.cpp b/lld/wasm/WriterUtils.cpp
index 88e89dff069c..1870b3686341 100644
--- a/lld/wasm/WriterUtils.cpp
+++ b/lld/wasm/WriterUtils.cpp
@@ -67,7 +67,7 @@ std::string toString(const WasmEventType &type) {
 static std::string toString(const llvm::wasm::WasmLimits &limits) {
   std::string ret;
   ret += "flags=0x" + std::to_string(limits.Flags);
-  ret += "; initial=" + std::to_string(limits.Initial);
+  ret += "; min=" + std::to_string(limits.Minimum);
   if (limits.Flags & WASM_LIMITS_FLAG_HAS_MAX)
     ret += "; max=" + std::to_string(limits.Maximum);
   return ret;
@@ -191,7 +191,7 @@ void writeInitExpr(raw_ostream &os, const WasmInitExpr &initExpr) {
 
 void writeLimits(raw_ostream &os, const WasmLimits &limits) {
   writeU8(os, limits.Flags, "limits flags");
-  writeUleb128(os, limits.Initial, "limits initial");
+  writeUleb128(os, limits.Minimum, "limits min");
   if (limits.Flags & WASM_LIMITS_FLAG_HAS_MAX)
     writeUleb128(os, limits.Maximum, "limits max");
 }

diff  --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h
index 9c3f2569addc..34be93b9112f 100644
--- a/llvm/include/llvm/BinaryFormat/Wasm.h
+++ b/llvm/include/llvm/BinaryFormat/Wasm.h
@@ -63,7 +63,7 @@ struct WasmExport {
 
 struct WasmLimits {
   uint8_t Flags;
-  uint64_t Initial;
+  uint64_t Minimum;
   uint64_t Maximum;
 };
 

diff  --git a/llvm/include/llvm/ObjectYAML/WasmYAML.h b/llvm/include/llvm/ObjectYAML/WasmYAML.h
index cc5df9674fb1..708e82c9b9f1 100644
--- a/llvm/include/llvm/ObjectYAML/WasmYAML.h
+++ b/llvm/include/llvm/ObjectYAML/WasmYAML.h
@@ -46,7 +46,7 @@ struct FileHeader {
 
 struct Limits {
   LimitFlags Flags;
-  yaml::Hex32 Initial;
+  yaml::Hex32 Minimum;
   yaml::Hex32 Maximum;
 };
 

diff  --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 25138d651b5b..2a679ca687d4 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -899,7 +899,7 @@ void WasmObjectWriter::writeTableSection(ArrayRef<wasm::WasmTable> Tables) {
   for (const wasm::WasmTable &Table : Tables) {
     encodeULEB128(Table.Type.ElemType, W->OS);
     encodeULEB128(Table.Type.Limits.Flags, W->OS);
-    encodeULEB128(Table.Type.Limits.Initial, W->OS);
+    encodeULEB128(Table.Type.Limits.Minimum, W->OS);
     if (Table.Type.Limits.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX)
       encodeULEB128(Table.Type.Limits.Maximum, W->OS);
   }

diff  --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index 1a0958ad039d..f759a6116198 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -208,7 +208,7 @@ static Error readInitExpr(wasm::WasmInitExpr &Expr,
 static wasm::WasmLimits readLimits(WasmObjectFile::ReadContext &Ctx) {
   wasm::WasmLimits Result;
   Result.Flags = readVaruint32(Ctx);
-  Result.Initial = readVaruint64(Ctx);
+  Result.Minimum = readVaruint64(Ctx);
   if (Result.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX)
     Result.Maximum = readVaruint64(Ctx);
   return Result;

diff  --git a/llvm/lib/ObjectYAML/WasmEmitter.cpp b/llvm/lib/ObjectYAML/WasmEmitter.cpp
index ce5d624c7a0e..acc5dff7369a 100644
--- a/llvm/lib/ObjectYAML/WasmEmitter.cpp
+++ b/llvm/lib/ObjectYAML/WasmEmitter.cpp
@@ -117,7 +117,7 @@ static int writeStringRef(const StringRef &Str, raw_ostream &OS) {
 
 static int writeLimits(const WasmYAML::Limits &Lim, raw_ostream &OS) {
   writeUint8(OS, Lim.Flags);
-  encodeULEB128(Lim.Initial, OS);
+  encodeULEB128(Lim.Minimum, OS);
   if (Lim.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX)
     encodeULEB128(Lim.Maximum, OS);
   return 0;

diff  --git a/llvm/lib/ObjectYAML/WasmYAML.cpp b/llvm/lib/ObjectYAML/WasmYAML.cpp
index 7e57df0c370b..67074b21298a 100644
--- a/llvm/lib/ObjectYAML/WasmYAML.cpp
+++ b/llvm/lib/ObjectYAML/WasmYAML.cpp
@@ -367,7 +367,7 @@ void MappingTraits<WasmYAML::Limits>::mapping(IO &IO,
                                               WasmYAML::Limits &Limits) {
   if (!IO.outputting() || Limits.Flags)
     IO.mapOptional("Flags", Limits.Flags);
-  IO.mapRequired("Initial", Limits.Initial);
+  IO.mapRequired("Minimum", Limits.Minimum);
   if (!IO.outputting() || Limits.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX)
     IO.mapOptional("Maximum", Limits.Maximum);
 }

diff  --git a/llvm/test/CodeGen/WebAssembly/call-indirect.ll b/llvm/test/CodeGen/WebAssembly/call-indirect.ll
index 3ce74ddfd30e..57e754ccb3be 100644
--- a/llvm/test/CodeGen/WebAssembly/call-indirect.ll
+++ b/llvm/test/CodeGen/WebAssembly/call-indirect.ll
@@ -22,7 +22,7 @@ define void @call_indirect_void(void ()* %callee) {
 ; OBJ-NEXT:        Field:           __linear_memory
 ; OBJ-NEXT:        Kind:            MEMORY
 ; OBJ-NEXT:        Memory:
-; OBJ-NEXT:          Initial:         0x0
+; OBJ-NEXT:          Minimum:         0x0
 ; OBJ-NEXT:      - Module:          env
 ; OBJ-NEXT:        Field:           __indirect_function_table
 ; OBJ-NEXT:        Kind:            TABLE

diff  --git a/llvm/test/CodeGen/WebAssembly/function-pointer64.ll b/llvm/test/CodeGen/WebAssembly/function-pointer64.ll
index 155e4807d297..21b2a8e17147 100644
--- a/llvm/test/CodeGen/WebAssembly/function-pointer64.ll
+++ b/llvm/test/CodeGen/WebAssembly/function-pointer64.ll
@@ -48,7 +48,7 @@ entry:
 
 ; YAML:      Memory:
 ; YAML-NEXT:   Flags:   [ IS_64 ]
-; YAML-NEXT:   Initial: 0x1
+; YAML-NEXT:   Minimum: 0x1
 
 ; YAML:      - Type:   CODE
 ; YAML:      - Type:   R_WASM_TABLE_INDEX_SLEB64

diff  --git a/llvm/test/MC/WebAssembly/assembler-binary.ll b/llvm/test/MC/WebAssembly/assembler-binary.ll
index e3a9a1b76a23..7b64f11cd68f 100644
--- a/llvm/test/MC/WebAssembly/assembler-binary.ll
+++ b/llvm/test/MC/WebAssembly/assembler-binary.ll
@@ -50,7 +50,7 @@ entry:
 ; CHECK-NEXT:         Field:           __linear_memory
 ; CHECK-NEXT:         Kind:            MEMORY
 ; CHECK-NEXT:         Memory:
-; CHECK-NEXT:           Initial:         0x0
+; CHECK-NEXT:           Minimum:         0x0
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           bar
 ; CHECK-NEXT:         Kind:            FUNCTION

diff  --git a/llvm/test/MC/WebAssembly/call-indirect-relocs.s b/llvm/test/MC/WebAssembly/call-indirect-relocs.s
index be4202f7d494..8a1b6451982f 100644
--- a/llvm/test/MC/WebAssembly/call-indirect-relocs.s
+++ b/llvm/test/MC/WebAssembly/call-indirect-relocs.s
@@ -45,7 +45,7 @@ empty_fref_table:
 # BIN-NEXT:         Field:           __linear_memory
 # BIN-NEXT:         Kind:            MEMORY
 # BIN-NEXT:         Memory:
-# BIN-NEXT:           Initial:         0x0
+# BIN-NEXT:           Minimum:         0x0
 # BIN-NEXT:   - Type:            FUNCTION
 # BIN-NEXT:     FunctionTypes:   [ 0 ]
 # BIN-NEXT:   - Type:            TABLE
@@ -53,7 +53,7 @@ empty_fref_table:
 # BIN-NEXT:       - Index:           0
 # BIN-NEXT:         ElemType:        FUNCREF
 # BIN-NEXT:         Limits:
-# BIN-NEXT:           Initial:         0x0
+# BIN-NEXT:           Minimum:         0x0
 # BIN-NEXT:   - Type:            CODE
 # BIN-NEXT:     Relocations:
 # BIN-NEXT:       - Type:            R_WASM_TYPE_INDEX_LEB

diff  --git a/llvm/test/MC/WebAssembly/comdat.ll b/llvm/test/MC/WebAssembly/comdat.ll
index 5af940d1ad51..6f8c1403be74 100644
--- a/llvm/test/MC/WebAssembly/comdat.ll
+++ b/llvm/test/MC/WebAssembly/comdat.ll
@@ -41,7 +41,7 @@ define linkonce_odr i32 @sharedFn() #1 comdat($sharedComdat) {
 ; CHECK-NEXT:         Field:           __linear_memory
 ; CHECK-NEXT:         Kind:            MEMORY
 ; CHECK-NEXT:         Memory:
-; CHECK-NEXT:           Initial:         0x1
+; CHECK-NEXT:           Minimum:         0x1
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           funcImport
 ; CHECK-NEXT:         Kind:            FUNCTION

diff  --git a/llvm/test/MC/WebAssembly/data-section.s b/llvm/test/MC/WebAssembly/data-section.s
index f948f523d5a2..72c735fec0f3 100644
--- a/llvm/test/MC/WebAssembly/data-section.s
+++ b/llvm/test/MC/WebAssembly/data-section.s
@@ -51,7 +51,7 @@ test0:
 # BIN-NEXT:         Kind:            MEMORY
 # BIN-NEXT:         Memory:
 # BIN64-NEXT:         Flags:           [ IS_64 ]
-# BIN-NEXT:           Initial:         0x1
+# BIN-NEXT:           Minimum:         0x1
 # BIN-NEXT:   - Type:            FUNCTION
 # BIN-NEXT:     FunctionTypes:   [ 0 ]
 # BIN-NEXT:   - Type:            DATACOUNT

diff  --git a/llvm/test/MC/WebAssembly/global-ctor-dtor.ll b/llvm/test/MC/WebAssembly/global-ctor-dtor.ll
index 5f56cb6e280d..df1252ef9ce1 100644
--- a/llvm/test/MC/WebAssembly/global-ctor-dtor.ll
+++ b/llvm/test/MC/WebAssembly/global-ctor-dtor.ll
@@ -25,7 +25,7 @@ declare void @func3()
 ; CHECK-NEXT:         Field:           __linear_memory
 ; CHECK-NEXT:         Kind:            MEMORY
 ; CHECK-NEXT:         Memory:
-; CHECK-NEXT:           Initial:         0x1
+; CHECK-NEXT:           Minimum:         0x1
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           func3
 ; CHECK-NEXT:         Kind:            FUNCTION
@@ -53,7 +53,7 @@ declare void @func3()
 ; CHECK-NEXT:           Index:           0
 ; CHECK-NEXT:           ElemType:        FUNCREF
 ; CHECK-NEXT:           Limits:
-; CHECK-NEXT:             Initial:         0x2
+; CHECK-NEXT:             Minimum:         0x2
 ; CHECK-NEXT:   - Type:            FUNCTION
 ; CHECK-NEXT:     FunctionTypes:   [ 0, 1, 0, 1 ]
 ; CHECK-NEXT:   - Type:            ELEM

diff  --git a/llvm/test/MC/WebAssembly/reloc-pic.s b/llvm/test/MC/WebAssembly/reloc-pic.s
index 477b2cb8ac5e..4036665ec932 100644
--- a/llvm/test/MC/WebAssembly/reloc-pic.s
+++ b/llvm/test/MC/WebAssembly/reloc-pic.s
@@ -62,7 +62,7 @@ hidden_func:
 # CHECK-NEXT:         Field:           __linear_memory
 # CHECK-NEXT:         Kind:            MEMORY
 # CHECK-NEXT:         Memory:
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:       - Module:          env
 # CHECK-NEXT:         Field:           default_func
 # CHECK-NEXT:         Kind:            FUNCTION
@@ -74,7 +74,7 @@ hidden_func:
 # CHECK-NEXT:           Index:           0
 # CHECK-NEXT:           ElemType:        FUNCREF
 # CHECK-NEXT:           Limits:
-# CHECK-NEXT:             Initial:         0x1
+# CHECK-NEXT:             Minimum:         0x1
 # CHECK-NEXT:       - Module:          GOT.mem
 # CHECK-NEXT:         Field:           default_data
 # CHECK-NEXT:         Kind:            GLOBAL

diff  --git a/llvm/test/MC/WebAssembly/tables.s b/llvm/test/MC/WebAssembly/tables.s
index a023b9970a83..b1bf1a988646 100644
--- a/llvm/test/MC/WebAssembly/tables.s
+++ b/llvm/test/MC/WebAssembly/tables.s
@@ -124,19 +124,19 @@ table_fill:
 # BIN-NEXT:      - Index:           0
 # BIN-NEXT:        ElemType:        EXTERNREF
 # BIN-NEXT:        Limits:
-# BIN-NEXT:          Initial:         0x0
+# BIN-NEXT:          Minimum:         0x0
 # BIN-NEXT:      - Index:           1
 # BIN-NEXT:        ElemType:        FUNCREF
 # BIN-NEXT:        Limits:
-# BIN-NEXT:          Initial:         0x0
+# BIN-NEXT:          Minimum:         0x0
 # BIN-NEXT:      - Index:           2
 # BIN-NEXT:        ElemType:        FUNCREF
 # BIN-NEXT:        Limits:
-# BIN-NEXT:          Initial:         0x0
+# BIN-NEXT:          Minimum:         0x0
 # BIN-NEXT:      - Index:           3
 # BIN-NEXT:        ElemType:        FUNCREF
 # BIN-NEXT:        Limits:
-# BIN-NEXT:          Initial:         0x0
+# BIN-NEXT:          Minimum:         0x0
 
 #      BIN:  - Type:            CODE
 # BIN-NEXT:    Relocations:

diff  --git a/llvm/test/MC/WebAssembly/type-index.s b/llvm/test/MC/WebAssembly/type-index.s
index 7c3ab80c5b83..906509e9d9af 100644
--- a/llvm/test/MC/WebAssembly/type-index.s
+++ b/llvm/test/MC/WebAssembly/type-index.s
@@ -37,7 +37,7 @@ test0:
 # BIN-NEXT:         Field:           __linear_memory
 # BIN-NEXT:         Kind:            MEMORY
 # BIN-NEXT:         Memory:
-# BIN-NEXT:           Initial:         0x0
+# BIN-NEXT:           Minimum:         0x0
 # BIN-NEXT:       - Module:          env
 # BIN-NEXT:         Field:           __indirect_function_table
 # BIN-NEXT:         Kind:            TABLE
@@ -45,7 +45,7 @@ test0:
 # BIN-NEXT:           Index:           0
 # BIN-NEXT:           ElemType:        FUNCREF
 # BIN-NEXT:           Limits:
-# BIN-NEXT:             Initial:         0x0
+# BIN-NEXT:             Minimum:         0x0
 # BIN-NEXT:   - Type:            FUNCTION
 # BIN-NEXT:     FunctionTypes:   [ 0 ]
 # BIN-NEXT:   - Type:            CODE

diff  --git a/llvm/test/MC/WebAssembly/wasm64.s b/llvm/test/MC/WebAssembly/wasm64.s
index 5cb64403569e..402d5020caba 100644
--- a/llvm/test/MC/WebAssembly/wasm64.s
+++ b/llvm/test/MC/WebAssembly/wasm64.s
@@ -148,7 +148,7 @@ test:
 # BIN-NEXT:         Kind:            MEMORY
 # BIN-NEXT:         Memory:
 # BIN-NEXT:           Flags:           [ IS_64 ]
-# BIN-NEXT:           Initial:         0x1
+# BIN-NEXT:           Minimum:         0x1
 # BIN-NEXT:       - Module:          env
 # BIN-NEXT:         Field:           myglob64
 # BIN-NEXT:         Kind:            GLOBAL

diff  --git a/llvm/test/MC/WebAssembly/weak-alias.s b/llvm/test/MC/WebAssembly/weak-alias.s
index 48bfc0b7a58d..7e6a9ffc36d3 100644
--- a/llvm/test/MC/WebAssembly/weak-alias.s
+++ b/llvm/test/MC/WebAssembly/weak-alias.s
@@ -87,7 +87,7 @@ alias_address:
 # CHECK-NEXT:         Field:           __linear_memory
 # CHECK-NEXT:         Kind:            MEMORY
 # CHECK-NEXT:         Memory:
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:       - Module:          env
 # CHECK-NEXT:         Field:           __indirect_function_table
 # CHECK-NEXT:         Kind:            TABLE
@@ -95,7 +95,7 @@ alias_address:
 # CHECK-NEXT:           Index:           0
 # CHECK-NEXT:           ElemType:        FUNCREF
 # CHECK-NEXT:           Limits:
-# CHECK-NEXT:             Initial:         0x1
+# CHECK-NEXT:             Minimum:         0x1
 # CHECK-NEXT:   - Type:            FUNCTION
 # CHECK-NEXT:     FunctionTypes:   [ 0, 0, 0, 0, 0 ]
 # CHECK-NEXT:   - Type:            ELEM
@@ -254,7 +254,7 @@ alias_address:
 # REF-NEXT:         Field:           __linear_memory
 # REF-NEXT:         Kind:            MEMORY
 # REF-NEXT:         Memory:
-# REF-NEXT:           Initial:         0x1
+# REF-NEXT:           Minimum:         0x1
 # REF-NEXT:       - Module:          env
 # REF-NEXT:         Field:           __indirect_function_table
 # REF-NEXT:         Kind:            TABLE
@@ -262,7 +262,7 @@ alias_address:
 # REF-NEXT:           Index:           0
 # REF-NEXT:           ElemType:        FUNCREF
 # REF-NEXT:           Limits:
-# REF-NEXT:             Initial:         0x1
+# REF-NEXT:             Minimum:         0x1
 # REF-NEXT:   - Type:            FUNCTION
 # REF-NEXT:     FunctionTypes:   [ 0, 0, 0, 0, 0 ]
 # REF-NEXT:   - Type:            ELEM

diff  --git a/llvm/test/Object/wasm-relocs-and-producers.yaml b/llvm/test/Object/wasm-relocs-and-producers.yaml
index 9bbb0a1d084d..a96aa1fece14 100644
--- a/llvm/test/Object/wasm-relocs-and-producers.yaml
+++ b/llvm/test/Object/wasm-relocs-and-producers.yaml
@@ -24,7 +24,7 @@ Sections:
         Field:           __linear_memory
         Kind:            MEMORY
         Memory:
-          Initial:         0x00000000
+          Minimum:         0x00000000
       - Module:          env
         Field:           __indirect_function_table
         Kind:            TABLE
@@ -32,7 +32,7 @@ Sections:
           Index:           0
           ElemType:        FUNCREF
           Limits:
-            Initial:         0x00000000
+            Minimum:         0x00000000
   - Type:            FUNCTION
     FunctionTypes:   [ 0 ]
   - Type:            CODE

diff  --git a/llvm/test/ObjectYAML/wasm/data_section.yaml b/llvm/test/ObjectYAML/wasm/data_section.yaml
index 957687e2465f..2289e8a72857 100644
--- a/llvm/test/ObjectYAML/wasm/data_section.yaml
+++ b/llvm/test/ObjectYAML/wasm/data_section.yaml
@@ -5,7 +5,7 @@ FileHeader:
 Sections:
   - Type:            MEMORY
     Memories:
-      - Initial:         0x00000003
+      - Minimum:         0x00000003
   - Type:            DATA
     Segments:
       - InitFlags:        0

diff  --git a/llvm/test/ObjectYAML/wasm/elem_section.yaml b/llvm/test/ObjectYAML/wasm/elem_section.yaml
index e60db7ddc129..c2563e6d76b4 100644
--- a/llvm/test/ObjectYAML/wasm/elem_section.yaml
+++ b/llvm/test/ObjectYAML/wasm/elem_section.yaml
@@ -9,7 +9,7 @@ Sections:
         ElemType:          FUNCREF
         Limits:
           Flags:           [ HAS_MAX ]
-          Initial:         0x00000010
+          Minimum:         0x00000010
           Maximum:         0x00000011
   - Type:            ELEM
     Segments:

diff  --git a/llvm/test/ObjectYAML/wasm/import_memory_shared.yaml b/llvm/test/ObjectYAML/wasm/import_memory_shared.yaml
index 087ce8435087..123181011e0c 100644
--- a/llvm/test/ObjectYAML/wasm/import_memory_shared.yaml
+++ b/llvm/test/ObjectYAML/wasm/import_memory_shared.yaml
@@ -17,7 +17,7 @@ Sections:
         Kind:            MEMORY
         Memory:
           Flags:           [ HAS_MAX, IS_SHARED ]
-          Initial:         0x00000010
+          Minimum:         0x00000010
           Maximum:         0x00000011
 
 ...
@@ -32,6 +32,6 @@ Sections:
 # CHECK:         Kind:            MEMORY
 # CHECK:         Memory:
 # CHECK:           Flags:           [ HAS_MAX, IS_SHARED ]
-# CHECK:           Initial:         0x10
+# CHECK:           Minimum:         0x10
 # CHECK:           Maximum:         0x11
 # CHECK: ...

diff  --git a/llvm/test/ObjectYAML/wasm/import_section.yaml b/llvm/test/ObjectYAML/wasm/import_section.yaml
index bc71e5f2ab20..e4c06368f625 100644
--- a/llvm/test/ObjectYAML/wasm/import_section.yaml
+++ b/llvm/test/ObjectYAML/wasm/import_section.yaml
@@ -26,7 +26,7 @@ Sections:
         Kind:            MEMORY
         Memory:
           Flags:           [ HAS_MAX ]
-          Initial:         0x00000010
+          Minimum:         0x00000010
           Maximum:         0x00000011
       - Module:          foo
         Field:           imported_table
@@ -36,7 +36,7 @@ Sections:
           ElemType:      FUNCREF
           Limits:
             Flags:           [ HAS_MAX ]
-            Initial:         0x00000020
+            Minimum:         0x00000020
             Maximum:         0x00000022
 ...
 # CHECK: --- !WASM
@@ -59,7 +59,7 @@ Sections:
 # CHECK:         Kind:            MEMORY
 # CHECK:         Memory:
 # CHECK:           Flags:           [ HAS_MAX ]
-# CHECK:           Initial:         0x10
+# CHECK:           Minimum:         0x10
 # CHECK:           Maximum:         0x11
 # CHECK:       - Module:          foo
 # CHECK:         Field:           imported_table
@@ -68,6 +68,6 @@ Sections:
 # CHECK:           ElemType:      FUNCREF
 # CHECK:           Limits:
 # CHECK:             Flags:           [ HAS_MAX ]
-# CHECK:             Initial:         0x20
+# CHECK:             Minimum:         0x20
 # CHECK:             Maximum:         0x22
 # CHECK: ...

diff  --git a/llvm/test/ObjectYAML/wasm/memory_section.yaml b/llvm/test/ObjectYAML/wasm/memory_section.yaml
index 22ca72419af8..6cd9db3ffd1d 100644
--- a/llvm/test/ObjectYAML/wasm/memory_section.yaml
+++ b/llvm/test/ObjectYAML/wasm/memory_section.yaml
@@ -6,9 +6,9 @@ Sections:
   - Type:            MEMORY
     Memories:         
       - Flags:           [ HAS_MAX ]
-        Initial:         0x00000002
+        Minimum:         0x00000002
         Maximum:         0x000000FF
-      - Initial:         0x00000003
+      - Minimum:         0x00000003
 ...
 # CHECK: --- !WASM
 # CHECK: FileHeader:
@@ -17,7 +17,7 @@ Sections:
 # CHECK:   - Type:            MEMORY
 # CHECK:     Memories:         
 # CHECK:       - Flags:            [ HAS_MAX ]
-# CHECK:         Initial:          0x2
+# CHECK:         Minimum:          0x2
 # CHECK:         Maximum:          0xFF
-# CHECK:       - Initial:          0x3
+# CHECK:       - Minimum:          0x3
 # CHECK: ...

diff  --git a/llvm/test/ObjectYAML/wasm/multiple-tables.yaml b/llvm/test/ObjectYAML/wasm/multiple-tables.yaml
index 50f03bc90641..b16a5396e012 100644
--- a/llvm/test/ObjectYAML/wasm/multiple-tables.yaml
+++ b/llvm/test/ObjectYAML/wasm/multiple-tables.yaml
@@ -18,7 +18,7 @@ Sections:
           Index:           0
           ElemType:        FUNCREF
           Limits:
-            Initial:         0x0
+            Minimum:         0x0
   - Type:            FUNCTION
     FunctionTypes:   [ 0 ]
   - Type:            TABLE
@@ -26,16 +26,16 @@ Sections:
       - Index:           1
         ElemType:        FUNCREF
         Limits:
-          Initial:         0x0
+          Minimum:         0x0
       - Index:           2
         ElemType:        EXTERNREF
         Limits:
-          Initial:         0x0
+          Minimum:         0x0
       - Index:           3
         ElemType:        FUNCREF
         Limits:
           Flags:           [ HAS_MAX ]
-          Initial:         0x3
+          Minimum:         0x3
           Maximum:         0x3
   - Type:            EXPORT
     Exports:
@@ -79,7 +79,7 @@ Sections:
 # CHECK-NEXT:           Index:           0
 # CHECK-NEXT:           ElemType:        FUNCREF
 # CHECK-NEXT:           Limits:
-# CHECK-NEXT:             Initial:         0x0
+# CHECK-NEXT:             Minimum:         0x0
 # CHECK-NEXT:   - Type:            FUNCTION
 # CHECK-NEXT:     FunctionTypes:   [ 0 ]
 # CHECK-NEXT:   - Type:            TABLE
@@ -87,16 +87,16 @@ Sections:
 # CHECK-NEXT:       - Index:           1
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
-# CHECK-NEXT:           Initial:         0x0
+# CHECK-NEXT:           Minimum:         0x0
 # CHECK-NEXT:       - Index:           2
 # CHECK-NEXT:         ElemType:        EXTERNREF
 # CHECK-NEXT:         Limits:
-# CHECK-NEXT:           Initial:         0x0
+# CHECK-NEXT:           Minimum:         0x0
 # CHECK-NEXT:       - Index:           3
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x3
+# CHECK-NEXT:           Minimum:         0x3
 # CHECK-NEXT:           Maximum:         0x3
 # CHECK-NEXT:   - Type:            EXPORT
 # CHECK-NEXT:     Exports:

diff  --git a/llvm/test/ObjectYAML/wasm/table_section.yaml b/llvm/test/ObjectYAML/wasm/table_section.yaml
index 18cff6de4166..e81b76626ab1 100644
--- a/llvm/test/ObjectYAML/wasm/table_section.yaml
+++ b/llvm/test/ObjectYAML/wasm/table_section.yaml
@@ -9,7 +9,7 @@ Sections:
         ElemType:        FUNCREF
         Limits:
           Flags:           [ HAS_MAX ]
-          Initial:         0x00000010
+          Minimum:         0x00000010
           Maximum:         0x00000011
 ...
 # CHECK: --- !WASM
@@ -22,6 +22,6 @@ Sections:
 # CHECK:        ElemType:        FUNCREF
 # CHECK:        Limits:
 # CHECK:          Flags:           [ HAS_MAX ]
-# CHECK:          Initial:         0x10
+# CHECK:          Minimum:         0x10
 # CHECK:          Maximum:         0x11
 # CHECK: ...

diff  --git a/llvm/test/tools/llvm-readobj/wasm/wasm-imports.test b/llvm/test/tools/llvm-readobj/wasm/wasm-imports.test
index dd93c14fbebe..e8f8c9d9154f 100644
--- a/llvm/test/tools/llvm-readobj/wasm/wasm-imports.test
+++ b/llvm/test/tools/llvm-readobj/wasm/wasm-imports.test
@@ -21,7 +21,7 @@ Sections:
         Field:           __linear_memory
         Kind:            MEMORY
         Memory:          
-          Initial:         0x00000000
+          Minimum:         0x00000000
       - Module:          env
         Field:           __indirect_function_table
         Kind:            TABLE
@@ -29,7 +29,7 @@ Sections:
           Index:           0
           ElemType:        FUNCREF
           Limits:          
-            Initial:         0x00000000
+            Minimum:         0x00000000
       - Module:          red
         Field:           foo
         Kind:            FUNCTION

diff  --git a/llvm/tools/llvm-readobj/WasmDumper.cpp b/llvm/tools/llvm-readobj/WasmDumper.cpp
index fb7134d20a85..0ee8c69122e9 100644
--- a/llvm/tools/llvm-readobj/WasmDumper.cpp
+++ b/llvm/tools/llvm-readobj/WasmDumper.cpp
@@ -192,7 +192,7 @@ void WasmDumper::printSectionHeaders() {
       ListScope Group(W, "Memories");
       for (const wasm::WasmLimits &Memory : Obj->memories()) {
         DictScope Group(W, "Memory");
-        W.printNumber("InitialPages", Memory.Initial);
+        W.printNumber("MinPages", Memory.Minimum);
         if (Memory.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX) {
           W.printNumber("MaxPages", WasmSec.Offset);
         }

diff  --git a/llvm/tools/obj2yaml/wasm2yaml.cpp b/llvm/tools/obj2yaml/wasm2yaml.cpp
index c421b14331c1..5ddf2c486610 100644
--- a/llvm/tools/obj2yaml/wasm2yaml.cpp
+++ b/llvm/tools/obj2yaml/wasm2yaml.cpp
@@ -34,7 +34,7 @@ class WasmDumper {
 static WasmYAML::Limits makeLimits(const wasm::WasmLimits &Limits) {
   WasmYAML::Limits L;
   L.Flags = Limits.Flags;
-  L.Initial = Limits.Initial;
+  L.Minimum = Limits.Minimum;
   L.Maximum = Limits.Maximum;
   return L;
 }


        


More information about the llvm-commits mailing list