diff options
author | Andy Ayers <andya@microsoft.com> | 2019-01-04 17:18:18 -0800 |
---|---|---|
committer | Andy Ayers <andya@microsoft.com> | 2019-01-04 17:18:18 -0800 |
commit | 4c68562cbd2f7a33bad60705db9b11e3121d40c2 (patch) | |
tree | 6652d9a31af13772f9978b0c40388651cc45cd1e /src/jit/lclvars.cpp | |
parent | df4a1854aa42c1e97874b00fe49339e216e30af9 (diff) | |
download | coreclr-4c68562cbd2f7a33bad60705db9b11e3121d40c2.tar.gz coreclr-4c68562cbd2f7a33bad60705db9b11e3121d40c2.tar.bz2 coreclr-4c68562cbd2f7a33bad60705db9b11e3121d40c2.zip |
JIT: encapsulate general checks for optimization
Add methods that answer the general question of whether or not
the jit is optimizing the code it produces.
Use this to replace composite checks for minopts and debug
codegen (the two modes where the jit is not optimizing).
Diffstat (limited to 'src/jit/lclvars.cpp')
-rw-r--r-- | src/jit/lclvars.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index e58130bd5b..c9029443b8 100644 --- a/src/jit/lclvars.cpp +++ b/src/jit/lclvars.cpp @@ -4021,13 +4021,13 @@ void Compiler::lvaMarkLocalVars() lvaComputeRefCounts(isRecompute, setSlotNumbers); // If we're not optimizing, we're done. - if (opts.MinOpts() || opts.compDbgCode) + if (opts.OptimizationDisabled()) { return; } #if ASSERTION_PROP - assert(!opts.MinOpts() && !opts.compDbgCode); + assert(opts.OptimizationEnabled()); // Note: optAddCopies() depends on lvaRefBlks, which is set in lvaMarkLocalVars(BasicBlock*), called above. optAddCopies(); @@ -4076,7 +4076,7 @@ void Compiler::lvaComputeRefCounts(bool isRecompute, bool setSlotNumbers) // // On first compute: mark all locals as implicitly referenced and untracked. // On recompute: do nothing. - if (opts.MinOpts() || opts.compDbgCode) + if (opts.OptimizationDisabled()) { if (isRecompute) { |