[PATCH] D49034: [WebAssembly] Move/clone DBG_VALUE during WebAssemblyRegStackify pass

Jacob Gravelle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 14:52:16 PDT 2018


jgravelle-google added a comment.

This still breaks two emscripten tests, test_the_bullet and test_poppler
In particular, it creates a wasm module that fails to typecheck, seemingly because of a reordering of instructions. Commenting out MoveDebugValues and CloneDebugValues is needed to avoid this.
The simplest reproduction I can find is:

  wasm32-clang++ $EMSCRIPTEN/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp \
    -D__EMSCRIPTEN__=1 \
    -I$EMSCRIPTEN/tests/bullet/src/ \
    -nostdlib \
    -Xclang -nostdsysteminc \
    -Xclang -isystem$EMSCRIPTEN/system/include/libc \
    -Xlinker --no-entry \
    -Xlinker --allow-undefined \
    -O2 -g -o test.wasm

where EMSCRIPTEN is the path to emscripten's main directory (containing emcc.py et al). This creates a test.wasm that is invalid, quickly verifiable with wabt's wasm2wat


Repository:
  rL LLVM

https://reviews.llvm.org/D49034





More information about the llvm-commits mailing list