diff options
-rw-r--r-- | src/passes/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/passes/LLVMMemoryCopyFillLowering.cpp (renamed from src/passes/MemoryCopyFillLowering.cpp) | 8 | ||||
-rw-r--r-- | src/passes/pass.cpp | 4 | ||||
-rw-r--r-- | src/passes/passes.h | 2 | ||||
-rw-r--r-- | test/lit/exec/memory-copy.wat | 2 | ||||
-rw-r--r-- | test/lit/exec/memory-fill.wat | 2 | ||||
-rw-r--r-- | test/lit/help/wasm-metadce.test | 8 | ||||
-rw-r--r-- | test/lit/help/wasm-opt.test | 8 | ||||
-rw-r--r-- | test/lit/help/wasm2js.test | 8 | ||||
-rw-r--r-- | test/lit/passes/memory-copy-fill-lowering.wast | 2 |
10 files changed, 23 insertions, 23 deletions
diff --git a/src/passes/CMakeLists.txt b/src/passes/CMakeLists.txt index 6053c5522..c6e079079 100644 --- a/src/passes/CMakeLists.txt +++ b/src/passes/CMakeLists.txt @@ -58,12 +58,12 @@ set(passes_SOURCES JSPI.cpp LegalizeJSInterface.cpp LimitSegments.cpp + LLVMMemoryCopyFillLowering.cpp LocalCSE.cpp LocalSubtyping.cpp LogExecution.cpp LoopInvariantCodeMotion.cpp Memory64Lowering.cpp - MemoryCopyFillLowering.cpp MemoryPacking.cpp MergeBlocks.cpp MergeSimilarFunctions.cpp diff --git a/src/passes/MemoryCopyFillLowering.cpp b/src/passes/LLVMMemoryCopyFillLowering.cpp index 5855e5450..e5b940a5a 100644 --- a/src/passes/MemoryCopyFillLowering.cpp +++ b/src/passes/LLVMMemoryCopyFillLowering.cpp @@ -25,8 +25,8 @@ // particular, pointer overflow is UB and not handled here). namespace wasm { -struct MemoryCopyFillLowering - : public WalkerPass<PostWalker<MemoryCopyFillLowering>> { +struct LLVMMemoryCopyFillLowering + : public WalkerPass<PostWalker<LLVMMemoryCopyFillLowering>> { bool needsMemoryCopy = false; bool needsMemoryFill = false; Name memCopyFuncName; @@ -253,8 +253,8 @@ struct MemoryCopyFillLowering } }; -Pass* createMemoryCopyFillLoweringPass() { - return new MemoryCopyFillLowering(); +Pass* createLLVMMemoryCopyFillLoweringPass() { + return new LLVMMemoryCopyFillLowering(); } } // namespace wasm diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index fcefb89ad..5cbf4a31f 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -272,10 +272,10 @@ void PassRegistry::registerPasses() { registerPass("table64-lowering", "lower 64-bit tables 32-bit ones", createTable64LoweringPass); - registerPass("memory-copy-fill-lowering", + registerPass("llvm-memory-copy-fill-lowering", "Lower memory.copy and memory.fill to wasm mvp and disable " "the bulk-memory feature.", - createMemoryCopyFillLoweringPass); + createLLVMMemoryCopyFillLoweringPass); registerPass("memory-packing", "packs memory into separate segments, skipping zeros", createMemoryPackingPass); diff --git a/src/passes/passes.h b/src/passes/passes.h index 121dbcd9d..212a2b0e4 100644 --- a/src/passes/passes.h +++ b/src/passes/passes.h @@ -80,6 +80,7 @@ Pass* createIntrinsicLoweringPass(); Pass* createTraceCallsPass(); Pass* createInstrumentLocalsPass(); Pass* createInstrumentMemoryPass(); +Pass* createLLVMMemoryCopyFillLoweringPass(); Pass* createLoopInvariantCodeMotionPass(); Pass* createMemory64LoweringPass(); Pass* createMemoryPackingPass(); @@ -116,7 +117,6 @@ Pass* createOptimizeForJSPass(); Pass* createOutliningPass(); #endif Pass* createPickLoadSignsPass(); -Pass* createMemoryCopyFillLoweringPass(); Pass* createModAsyncifyAlwaysOnlyUnwindPass(); Pass* createModAsyncifyNeverUnwindPass(); Pass* createPoppifyPass(); diff --git a/test/lit/exec/memory-copy.wat b/test/lit/exec/memory-copy.wat index 793f94656..3583b048e 100644 --- a/test/lit/exec/memory-copy.wat +++ b/test/lit/exec/memory-copy.wat @@ -1,6 +1,6 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited. -;; RUN: wasm-opt %s --enable-bulk-memory --memory-copy-fill-lowering --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s +;; RUN: wasm-opt %s --enable-bulk-memory --llvm-memory-copy-fill-lowering --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s ;; Tests derived from bulk-memory.wast spec tests diff --git a/test/lit/exec/memory-fill.wat b/test/lit/exec/memory-fill.wat index dc9aead6d..c63dcef0c 100644 --- a/test/lit/exec/memory-fill.wat +++ b/test/lit/exec/memory-fill.wat @@ -1,6 +1,6 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited. -;; RUN: wasm-opt %s --enable-bulk-memory --memory-copy-fill-lowering --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s +;; RUN: wasm-opt %s --enable-bulk-memory --llvm-memory-copy-fill-lowering --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s ;; Tests derived from bulk-memory.wast spec tests diff --git a/test/lit/help/wasm-metadce.test b/test/lit/help/wasm-metadce.test index 908b381e8..50f71f8f5 100644 --- a/test/lit/help/wasm-metadce.test +++ b/test/lit/help/wasm-metadce.test @@ -230,6 +230,10 @@ ;; CHECK-NEXT: --limit-segments attempt to merge segments to fit ;; CHECK-NEXT: within web limits ;; CHECK-NEXT: +;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and +;; CHECK-NEXT: memory.fill to wasm mvp and +;; CHECK-NEXT: disable the bulk-memory feature. +;; CHECK-NEXT: ;; CHECK-NEXT: --local-cse common subexpression elimination ;; CHECK-NEXT: inside basic blocks ;; CHECK-NEXT: @@ -239,10 +243,6 @@ ;; CHECK-NEXT: --log-execution instrument the build with ;; CHECK-NEXT: logging of where execution goes ;; CHECK-NEXT: -;; CHECK-NEXT: --memory-copy-fill-lowering Lower memory.copy and -;; CHECK-NEXT: memory.fill to wasm mvp and -;; CHECK-NEXT: disable the bulk-memory feature. -;; CHECK-NEXT: ;; CHECK-NEXT: --memory-packing packs memory into separate ;; CHECK-NEXT: segments, skipping zeros ;; CHECK-NEXT: diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test index 7d173b084..b30f62150 100644 --- a/test/lit/help/wasm-opt.test +++ b/test/lit/help/wasm-opt.test @@ -239,6 +239,10 @@ ;; CHECK-NEXT: --limit-segments attempt to merge segments to fit ;; CHECK-NEXT: within web limits ;; CHECK-NEXT: +;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and +;; CHECK-NEXT: memory.fill to wasm mvp and +;; CHECK-NEXT: disable the bulk-memory feature. +;; CHECK-NEXT: ;; CHECK-NEXT: --local-cse common subexpression elimination ;; CHECK-NEXT: inside basic blocks ;; CHECK-NEXT: @@ -248,10 +252,6 @@ ;; CHECK-NEXT: --log-execution instrument the build with ;; CHECK-NEXT: logging of where execution goes ;; CHECK-NEXT: -;; CHECK-NEXT: --memory-copy-fill-lowering Lower memory.copy and -;; CHECK-NEXT: memory.fill to wasm mvp and -;; CHECK-NEXT: disable the bulk-memory feature. -;; CHECK-NEXT: ;; CHECK-NEXT: --memory-packing packs memory into separate ;; CHECK-NEXT: segments, skipping zeros ;; CHECK-NEXT: diff --git a/test/lit/help/wasm2js.test b/test/lit/help/wasm2js.test index 514f638d9..69923a064 100644 --- a/test/lit/help/wasm2js.test +++ b/test/lit/help/wasm2js.test @@ -193,6 +193,10 @@ ;; CHECK-NEXT: --limit-segments attempt to merge segments to fit ;; CHECK-NEXT: within web limits ;; CHECK-NEXT: +;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and +;; CHECK-NEXT: memory.fill to wasm mvp and +;; CHECK-NEXT: disable the bulk-memory feature. +;; CHECK-NEXT: ;; CHECK-NEXT: --local-cse common subexpression elimination ;; CHECK-NEXT: inside basic blocks ;; CHECK-NEXT: @@ -202,10 +206,6 @@ ;; CHECK-NEXT: --log-execution instrument the build with ;; CHECK-NEXT: logging of where execution goes ;; CHECK-NEXT: -;; CHECK-NEXT: --memory-copy-fill-lowering Lower memory.copy and -;; CHECK-NEXT: memory.fill to wasm mvp and -;; CHECK-NEXT: disable the bulk-memory feature. -;; CHECK-NEXT: ;; CHECK-NEXT: --memory-packing packs memory into separate ;; CHECK-NEXT: segments, skipping zeros ;; CHECK-NEXT: diff --git a/test/lit/passes/memory-copy-fill-lowering.wast b/test/lit/passes/memory-copy-fill-lowering.wast index 540237ff7..551f5a4e6 100644 --- a/test/lit/passes/memory-copy-fill-lowering.wast +++ b/test/lit/passes/memory-copy-fill-lowering.wast @@ -1,6 +1,6 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. -;; RUN: wasm-opt --enable-bulk-memory %s --memory-copy-fill-lowering -S -o - | filecheck %s +;; RUN: wasm-opt --enable-bulk-memory %s --llvm-memory-copy-fill-lowering -S -o - | filecheck %s (module (memory 0) |