summaryrefslogtreecommitdiff
path: root/src/passes/MultiMemoryLowering.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2022-11-08 15:43:22 -0800
committerGitHub <noreply@github.com>2022-11-08 15:43:22 -0800
commitd7920cb9dc07a2efee8abf44d7c1a6a654a88593 (patch)
treec1d8dd9ebfb1c81edddfd156edc0c366135d200c /src/passes/MultiMemoryLowering.cpp
parent85ba74c8162ebf4e659a3450de0fb48a4a7141b0 (diff)
downloadbinaryen-d7920cb9dc07a2efee8abf44d7c1a6a654a88593.tar.gz
binaryen-d7920cb9dc07a2efee8abf44d7c1a6a654a88593.tar.bz2
binaryen-d7920cb9dc07a2efee8abf44d7c1a6a654a88593.zip
Fix possible-contents.h for `array.new_{data,elem}` (#5232)
* Update MemoryPacking for array.new_data The MemoryPacking pass looks at all instructions that reference memory segments to determine how they can be optimized. #5214 introduced a new instruction that references memory segments, array.new_data, but did not update MemoryPacking accordingly. This omission meant that MemoryPacking could produce invalid or misoptimized modules in the presence of array.new_data. Fix the problem by making MemoryPacking aware of array.new_data. Consider array.new_data when determining whether a segment is used and update array.new_data to reflect the new, optimized segment numberings afterward. To keep things simple, do not try to split any segment that is referred to by a array.new_data instruction. * fix * Add test explanations * Fix possible-contents.h for `array.new_{data,elem}` This code was not properly updated in #5214, so GUFA would incorrectly optimize out `array.new_data` and `array.new_elem` instructions. Fix the problem by making these instructions data flow roots. * fix * move tests
Diffstat (limited to 'src/passes/MultiMemoryLowering.cpp')
0 files changed, 0 insertions, 0 deletions