Inliner: updates to random inlining (#8088)
authorAndy Ayers <andya@microsoft.com>
Sat, 12 Nov 2016 03:52:24 +0000 (19:52 -0800)
committerGitHub <noreply@github.com>
Sat, 12 Nov 2016 03:52:24 +0000 (19:52 -0800)
commit7697dec7db3e34239ffa33d8867de12f7176e415
treeb25e1ffbd9b10ea5095d25a7b2cb3f530b453038
parent6d93a827a2417662e64d55fea252acd49b5b9ebb
Inliner: updates to random inlining (#8088)

Cache the random state on the InlineStrategy instead of on the compiler
instance so that the state is reinitialized and private to each jit request.
That way the random policy evaluations made compiling one method won't
alter the evaluations for subsequent methods. This should make it somewhat
easier to do A/B comparisons under jit stress when changing the jit.

Make it possible to enable the RandomPolicy outside of stress. This may
prove useful in various randomized inline performance studies or as
a simple stress mode on its own.

Random state seed is built from an external seed value (via JitStress or
JitInlinePolicyRandom) and an internal seed value (method hash), so that
random sequences potentially differ for each method but are deterministic
across runs and changes to the jit.
src/jit/compiler.cpp
src/jit/compiler.h
src/jit/inline.cpp
src/jit/inline.h
src/jit/inlinepolicy.cpp
src/jit/inlinepolicy.h
src/jit/jitconfigvalues.h