Merge pull request #3229 from AndyAyersMS/InlineRefactor4a
authorAndy Ayers <andya@microsoft.com>
Thu, 18 Feb 2016 21:34:09 +0000 (13:34 -0800)
committerAndy Ayers <andya@microsoft.com>
Thu, 18 Feb 2016 21:34:09 +0000 (13:34 -0800)
Inline refactoring: add candidate observations

1  2 
src/jit/flowgraph.cpp
src/jit/importer.cpp
src/jit/inline.def

Simple merge
@@@ -15872,8 -15878,50 +15874,8 @@@ void Compiler::impCanInlineIL(CORINFO_M
          return;
      }
  
 -#ifdef FEATURE_LEGACYNETCF
 -
 -    // Check for NetCF quirks mode and the NetCF restrictions
 -    if (opts.eeFlags & CORJIT_FLG_NETCF_QUIRKS)
 -    {
 -       if (codeSize > 16)
 -       {
 -          compInlineResult->noteFatal(InlineObservation::CALLEE_WP7QUIRK_IL_TOO_BIG);
 -          return;
 -       }
 -
 -       if (methInfo->EHcount)
 -       {
 -          compInlineResult->noteFatal(InlineObservation::CALLEE_WP7QUIRK_HAS_EH);
 -          return;
 -       }
 -
 -       if (methInfo->locals.numArgs > 0)
 -       {
 -          compInlineResult->noteFatal(InlineObservation::CALLEE_WP7QUIRK_HAS_LOCALS);
 -          return;
 -       }
 -
 -       if (methInfo->args.retType == CORINFO_TYPE_FLOAT)
 -       {
 -          compInlineResult->noteFatal(InlineObservation::CALLEE_WP7QUIRK_HAS_FP_RET);
 -          return;
 -       }
 -
 -       CORINFO_ARG_LIST_HANDLE argLst = methInfo->args.args;
 -       for(unsigned i = methInfo->args.numArgs; i > 0; --i, argLst = info.compCompHnd->getArgNext(argLst))
 -       {
 -           if (TYP_FLOAT == eeGetArgType(argLst, &methInfo->args))
 -           {
 -               compInlineResult->noteFatal(InlineObservation::CALLEE_WP7QUIRK_HAS_FP_ARG);
 -               return;
 -           }
 -       }
 -    }
 -
 -#endif // FEATURE_LEGACYNETCF
 -
      // Still a viable candidate...
-     inlineResult->setCandidate("impCanInlineIL");
+     inlineResult->noteCandidate(InlineObservation::CALLEE_CAN_INLINE_IL);
  }
  
  /*****************************************************************************
Simple merge