[WebAssembly] Reorganize address offset folding.
authorDan Gohman <dan433584@gmail.com>
Mon, 11 Jan 2016 22:05:44 +0000 (22:05 +0000)
committerDan Gohman <dan433584@gmail.com>
Mon, 11 Jan 2016 22:05:44 +0000 (22:05 +0000)
commit1235eb2fc60f61cc0f73cbb53adc4f1d90560af0
tree6f403f8db1faa85551ecda775595ae44fefe282b
parent6e3a667705ac8f405e91cc378a299548834c11aa
[WebAssembly] Reorganize address offset folding.

Always expect tglobaladdr and texternalsym to be wrapped in
WebAssemblywrapper nodes. Also, split out a regPlusGA from regPlusImm so
that it can special-case global addresses, as they can be folded in more
cases.

Unfortunately this doesn't enable any new optimizations yet due to
SelectionDAG limitations. I'll be submitting changes to the SelectionDAG
infrastructure, along with tests, in a separate patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257394 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyInstrMemory.td