OSDN Git Service

[WebAssembly] Fix WebAssembly register numbering for registers added late.
authorDan Gohman <dan433584@gmail.com>
Wed, 25 Nov 2015 21:13:02 +0000 (21:13 +0000)
committerDan Gohman <dan433584@gmail.com>
Wed, 25 Nov 2015 21:13:02 +0000 (21:13 +0000)
commit2aff4b612e0fa7adc98204cfc8403d26775ccb39
tree71298cb5722afadb228340958765128bdf25f9a1
parent5fc0e47e6b56d8236d2095efa3f3af4bd442f961
[WebAssembly] Fix WebAssembly register numbering for registers added late.

If virtual registers are created late, mappings to WebAssembly
registers need to be added explicitly. This patch adds a function
to do so and teaches WebAssemblyPeephole to use it. This fixes
an out-of-bounds access on the WARegs vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254094 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
lib/Target/WebAssembly/WebAssemblyPeephole.cpp