Don't perform constant propagation when relocatable handles are involved.
authorEugene Rozenfeld <erozen@microsoft.com>
Mon, 18 Apr 2016 23:04:05 +0000 (16:04 -0700)
committerEugene Rozenfeld <erozen@microsoft.com>
Thu, 21 Apr 2016 00:05:48 +0000 (17:05 -0700)
commit4d817943e480d61c0de420e740a9d66f884adab9
tree545521c42303add76b36c2b92b1719e1448b146d
parente2ce9af7fbb696cfcc3d6da966e8bb1379fd74ea
Don't perform constant propagation when relocatable handles are involved.

This change ensures that value-number-based constant propagation won't
attempt to propagate constants whose value calculations involve handles
when those handles are relocatable and have to be recorded with the VM.

DDR is clean.

4 methods are affected in SuperPMI:

33.09:         Code Size improvements (code sizes in bytes):
33.09:         <filename>                                            baseline        diff improvement  %improvement    #funcs
33.09:         CLR_SH_1_Clean_Thin_Unique_all.dasm                         41          49          -8        -19.51         1
33.09:            1 functions regressed (8 total bytes regression)
33.09:               Regression # 1 goes from    41 to    49, diff of     8 (16.33%) :: <Module>:main():int
33.09:         JIT_SH_Clean_Thin_Unique_all.dasm                         3952        3973         -21         -0.53         9
33.09:            1 aggregated functions improved (4 total bytes improvement)
33.09:               Improvement # 1 goes from  3056 to  3052, diff of     4 ( 0.13%) ::  7 x Exploit:ExploitTarget()
33.09:            2 functions regressed (25 total bytes regression)
33.09:               Regression # 1 goes from    54 to    62, diff of     8 (12.90%) :: <Module>:main():int
33.09:               Regression # 2 goes from   842 to   859, diff of    17 ( 1.98%) :: <Module>:BadFunc(long)
33.09:         TOTAL                                                     3993        4022         -29         -0.73        10
src/jit/assertionprop.cpp
src/jit/gentree.cpp
src/jit/gentree.h
src/jit/valuenum.cpp
tests/src/JIT/Regression/JitBlue/DevDiv_206786/app.config [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/DevDiv_206786/handleMath.il [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/DevDiv_206786/handleMath.ilproj [new file with mode: 0644]