Value-number `ByrefExposed` memory and loads
authorJoseph Tremoulet <jotrem@microsoft.com>
Fri, 13 Jan 2017 19:55:06 +0000 (14:55 -0500)
committerJoseph Tremoulet <jotrem@microsoft.com>
Wed, 8 Feb 2017 14:32:46 +0000 (09:32 -0500)
commita796400efe6bd2bc223b9d9367ec3b8a45647860
treee3d196c993b72d56826d255af356a739b07f17be
parent1c6a419710ed292f2fa48e459239ee95e3ed2ca2
Value-number `ByrefExposed` memory and loads

Teach value numbering to keep track of the current value number for
`ByrefExposed` memory, updating it appropriately at relevant stores.
Introduce a new VN operator `ByrefExposedLoad`, used for loads of
address-exposed locals and loads by indirs that don't have more specific
value numbers, which is a function of the current `ByrefExposed` memory VN
and the pointer VN.  This allows loop hoisting and CSE to recognize
redundant loads via byrefs when there are no intervening stores.

Fixes #7903.
src/jit/compiler.h
src/jit/valuenum.cpp
src/jit/valuenum.h
src/jit/valuenumfuncs.h