wasm2c: Alter how segments are loaded
This reduces the number of usages of the LOAD_DATA macro from the number of segments to one. For large binaries, this greatly reduces the amount of memory required to compile the library
If possible, if you have a simple benchmark that you are using measure compile time for a wasm module with lots of segment data, that would be great to include in the benchmarks folder as well.
If possible, if you have a simple benchmark that you are using measure compile time for a wasm module with lots of segment data, that would be great to include in the benchmarks folder as well.
We tracked this down offline to the use of -Wthread-safety-analysis in clang when compiling the generated code. Its not clear yet if this is bug.. but we should probably hold off landing this until we figure it out.