From 4c68562cbd2f7a33bad60705db9b11e3121d40c2 Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Fri, 4 Jan 2019 17:18:18 -0800 Subject: 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). --- src/jit/lclvars.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jit/lclvars.cpp') 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) { -- cgit v1.2.3