1. 11 4月, 2021 1 次提交
    • A
      Update logic around BB_MAX_WEIGHT (#51027) · 9b647fe1
      Andy Ayers 提交于
      Consider any weight greater or equal to be a max weight. Rule of thumb
      is that you can assign BB_MAX_WEIGHT but for comparsions one should always
      use an inequality or call the helper method.
      
      Fixes #50808.
      9b647fe1
  2. 03 4月, 2021 1 次提交
  3. 19 3月, 2021 1 次提交
    • B
      Improve the speed of using COMPlus_JitTimeLogCsv (#49798) · 2b2ebba1
      Bruce Forstall 提交于
      * Improve the speed of using COMPlus_JitTimeLogCsv
      
      I noticed that setting this and running a superpmi replay
      was super slow. (Btw, note that you must use `--sequential`
      in the scenario to avoid parallel writes to the log file).
      
      This change fixes this in a number of ways:
      1. The `CycleTimer::CyclesPerSecond()` function does not-trivial
      computation to compute its answer. So cache the result.
      2. It's expensive to constantly open and close the output file
      (once per function). Partially, this is because anti-virus seems to
      get involved. So open it once, and keep it open until the JIT
      process is shut down.
      3. Avoid calling `eeGetMethodFullName()` in DEBUG builds. (Note that
      JitTimeLogCsv collects interesting information beyond just per-phase
      timings that are also useful for extracting from a CSV file.)
      
      * Fix CachedCyclesPerSecond logging
      
      * Fix clang build break
      2b2ebba1
  4. 10 3月, 2021 1 次提交
  5. 08 12月, 2020 1 次提交
    • T
      December infra rollout - remove duplicated 'src' from coreclr subrepo... · 69e114c1
      Tomáš Rylek 提交于
      December infra rollout - remove duplicated 'src' from coreclr subrepo (src/coreclr/src becomes src/coreclr) (#44973)
      
      * Move src/coreclr/src/Directory.Build.targets to src/coreclr
      Merge src/coreclr/src/CMakeLists.txt into src/coreclr/CMakeLists.txt
      
      * Mechanical move of src/coreclr/src to src/coreclr
      
      * Scripts adjustments to reflect the changed paths
      69e114c1
  6. 25 11月, 2020 1 次提交
    • A
      JIT: change basic block weight to float (#45052) · 70314564
      Andy Ayers 提交于
      Change the core data type for basic block weights from unsigned to float,
      to simplify overall calculations and allow for a wider dynamic range.
      
      Many changes are straightforward, but a few are worth noting:
      * LSRA needs a true max weight, so had to introduce infinity
      * I removed some of the overflow checking as floats naturally saturate.
      * The simple geometric loop weight scaling (*8 per loop nest level) leads
        to some very large counts in some tests (15 level loop nests). We may
        want to rethink this and scale less aggressively in deep nests.
      * Morph's use of the weighted ref counts for RCS_EARLY is nonstandard
        and the values are not actually weights, so I just added a cast back to unsigned.
      * Several places in the jit seem to try and compare or combine unweighted
        and weighted counts; I don't think this makes sense. But have left as is.
      * Lower, LIR, and Decompose were passing around weights but never using them.
      * I had to introduce a special new weight for the inline projection we do
        for the prejit root.
      
      These changes lead to small numbers of diffs, mostly places where small rounding
      changes have altered heuristics; notably:
      * cse weights
      * LSRA's initial take on whether a parameter should be enregistered
      
      Overall diff impact is a wash.
      
      There are almost no diffs without PGO/IBC data. Diffs are slightly more
      prominent in the Roslyn assemblies prejitted with some IBC.
      
      I've tried to keep the format of weights the same in dumps (in most places)
      and see minimal diffs in dumps too.
      70314564
  7. 10 11月, 2020 1 次提交
  8. 06 11月, 2020 1 次提交
    • A
      JIT: minor inliner refactoring (#44215) · 8ed2e953
      Andy Ayers 提交于
      Extract out the budget check logic so it can vary by inlining policy.
      Use this to exempt the FullPolicy from budget checking.
      
      Fix inline xml to dump the proper (full name) hash for inlinees.
      
      Update range dumper to dump ranges in hex.
      8ed2e953
  9. 29 7月, 2020 1 次提交
  10. 25 7月, 2020 1 次提交
    • E
      Fix issues with JitStressRange (#39754) · 8782d4ba
      Egor Chesakov 提交于
      * Add 10 when digit is [a-fA-F] in ConfigMethodRange::InitRanges in utils.cpp
      
      * Zero out compMethodHashPrivate earlier in Compiler::compInit() in compiler.cpp
      8782d4ba
  11. 08 7月, 2020 1 次提交
  12. 17 6月, 2020 1 次提交
  13. 28 3月, 2020 1 次提交
  14. 22 2月, 2020 1 次提交
    • J
      JIT/EE interface cleanup (#32521) · 52832184
      Jan Kotas 提交于
      * Delete methods on JIT/EE interface that are no longer used in CoreCLR
      
      * Remove workaround for getLocationOfThisType method
      
      * Hardcode verificationNeeded to false
      
      * Added links to issues
      
      * Delete .gitmirror files
      52832184
  15. 07 2月, 2020 1 次提交
    • S
      Fix JIT TARGET usage (#31740) · 9001f7f6
      Steve MacLean 提交于
      * Fix JIT TARGET usage
      
      Fixes _TARGET* & TARGET*_ comments
      
      Fixes TARGET_XARCH4 reference to TARGET_XARCH
      
      Fixes #31372
      
      * Remove no way assert
      
      * Fix JIT formatting
      
      * Use defined() in optcse.cpp
      9001f7f6
  16. 01 2月, 2020 1 次提交
    • S
      Rename cross compilation related defines (#2256) · fcd862e0
      Steve MacLean 提交于
      * Rename identifiers to be more consistent
      
      This patch was a machine generated search and replace of
      identifiers.  The replacement was done in the order listed
      for the path specified.
      
      A regex was used to find the identifiers.
      
      s/(^|[^A-CE-Za-z0-9_])${find}($|[^A-Za-z0-9_])
      
      The 'D' character was specifically allowed a s a prefix
      to catch add_definitions(-D${find}).
      
      The patch also reverts all managed code changes after replacement.
      
          _ARM_                -> HOST_ARM       in src/coreclr
          _ARM64_              -> HOST_ARM64     in src/coreclr
          _AMD64_              -> HOST_AMD64     in src/coreclr
          _X86_                -> HOST_X86       in src/coreclr
          _HOST_UNIX_          -> HOST_UNIX      in src/coreclr
          _HOST_AMD64_         -> HOST_AMD64     in src/coreclr
          _HOST_ARM64_         -> HOST_ARM64     in src/coreclr
          _HOST_ARM_           -> HOST_ARM       in src/coreclr
          _HOST_X86_           -> HOST_X86       in src/coreclr
          DBG_TARGET_AMD64     -> TARGET_AMD64   in src/coreclr
          DBG_TARGET_ARM64     -> TARGET_ARM64   in src/coreclr
          DBG_TARGET_ARM       -> TARGET_ARM     in src/coreclr
          DBG_TARGET_X86       -> TARGET_X86     in src/coreclr
          _TARGET_AMD64_       -> TARGET_AMD64   in src/coreclr
          _TARGET_ARM_         -> TARGET_ARM     in src/coreclr
          _TARGET_ARM64_       -> TARGET_ARM64   in src/coreclr
          _TARGET_X86_         -> TARGET_X86     in src/coreclr
          _TARGET_ARMARCH_     -> TARGET_ARMARCH in src/coreclr
          _TARGET_XARCH_       -> TARGET_XARCH   in src/coreclr
          _HOST_64BIT_         -> HOST_64BIT     in src/coreclr
          BIT64                -> HOST_64BIT     in src/coreclr
          _TARGET_64BIT_       -> TARGET_64BIT   in src/coreclr
          DBG_TARGET_64BIT     -> TARGET_64BIT   in src/coreclr
          HOST_IS_WINDOWS_OS   -> HOST_WINDOWS   in src/coreclr
          PLATFORM_UNIX        -> HOST_UNIX      in src/coreclr/*.cmake
          PLATFORM_WINDOWS     -> HOST_WINDOWS   in src/coreclr/*.cmake
          _TARGET_MAC64        -> TARGET_OSX     in src/coreclr
          FEATURE_PAL          -> TARGET_UNIX    in src/coreclr
          _TARGET_UNIX_        -> TARGET_UNIX    in src/coreclr
          _TARGET_WINDOWS_     -> TARGET_WINDOWS in src/coreclr
          PLATFORM_UNIX        -> TARGET_UNIX    in src/coreclr
          PLATFORM_WINDOWS     -> TARGET_WINDOWS in src/coreclr
      
      * Miscellaneous manual fixes to fix compilation
      
      Remove unused defines
      
      Remove BIT32
      Remove DBG_TARGET_AMD64_UNIX
      Remove DBG_TARGET_ARM64_UNIX
      Remove DBG_TARGET_ARM_UNIX
      Remove DBG_TARGET_32BIT
      
      Fixes for HOST_<arch> rename
      
      Move TARGET_<Arch> and TARGET_<bit>
      
      Move from clrdefinitions.cmake
      to configurecompiler.cmake so it is used globally.
      
      More jit.h
      
      * Whitespace by clang-format
      fcd862e0
  17. 31 1月, 2020 1 次提交
    • A
      JIT: improve stress range experience (#2313) · 6dd6b6cc
      Andy Ayers 提交于
      Use `compMethodHash` for stress and inline range inclusions.
      
      Base all stress decisions on the hash of the root method.
      
      Indicate if stress is potentially active for a method in the one-line output
      from `DumpJittedMethods`. Indicate if stress is active but this method is
      excluded from stress by name or hash.
      
      Update inline xml to use hex for tokens and hashes.
      
      Update`JitPrintInlinedMethods` to take a method set, likewise for `JitPrintDevirtualizedMethods`.
      6dd6b6cc
  18. 07 1月, 2020 1 次提交
  19. 04 1月, 2020 1 次提交
    • V
      Removing ArrayTypeDesc (#1201) · 5bba5aa3
      Vladimir Sadov 提交于
      * Reduce use of ArrayTpeDesc, somewhat
      
      * remove `AsArray`. Fewer uses of ArrayTypeDesc
      
      * remove `IsArrayType`
      
      * remove AssertArrayTypeDescLoaded
      
      * normalized use of GetElementType vs GetTypeParam vs GetArrayElementTypeHandle
      
      * removed GetMethodTableOfElementType
      
      * HasTypeParam  and GetTypeParam should work for TypeHandle when array is not a TypeDesc
      
      * Some cleanup of `IsTypeDesc` use.
      
      * Removed `ArrayTypeDesc`
      
      * a few fixes
      
      * another fix
      
      * dealt with TODOs
      
      * couple fixes from reviewing code
      
      * PR feedback:
      Removed `CORINFO_HELP_NEWARR_1_R2R_DIRECT`
      Folded a `cmp` in x86 array Address.
      Removed` METHOD__BUFFER__BLOCKCOPY` from mscorlib.h
      `GetMethodTableOfRootTypeParam`
      `GetRootTypeParam`
      Straightened `Object::GetTypeHandle`
      `AsMethodTable` changes from PR feedback
      
      * Removed `ELEMENT_TYPE_NATIVE_ARRAY_TEMPLATE_ZAPSIG`
      
      * `TypeDesc` is ok in `canInlineTypeCheckWithObjectVTable`
      
      * trivial  `AsMethodTable` changes
      
      *  `GetVarTypeForTypeHandle` should throw `unsupported` on TypeDescs
      
      * not digging for the root element type in `GetGCSafeTypeHandleIfPossible`
      
      * Last PR feedback
      
      * Fix `TypeInfoTests.Guid()`
      5bba5aa3
  20. 12 11月, 2019 1 次提交
  21. 24 9月, 2019 1 次提交
    • E
      Replace (val / 2) with (val * 0.5) in Jit (dotnet/coreclr#24584) · f80616ef
      Egor Bogatov 提交于
      * Replace "val / dcon" with "val * (1.0 / dcon)"
      
      * fix formatting issue
      
      * replace tree->gtOp.gtOp2 with op2
      
      * Address feedback
      
      * fix mantissa calculations
      
      * fix double mantissa
      
      * use frexp+isnormal
      
      * use frexp
      
      * rollback frexp impl
      
      * Add isNormal(float/double)
      
      * fix exponent in isPow2(double)
      
      * cleanup
      
      * Add tests
      
      * cleanup
      
      * drop _finitef
      
      * improve tests
      
      * rename to hasPreciseReciprocal
      
      * Add comments
      
      * fix formatting issues
      
      * add more test cases
      
      * undo some formatting changes
      
      * undo some formatting changes
      
      * Address mikedn's feedback
      
      * forgot to replace c-cast with reinterpret_cast in IsNormal()
      
      * add fixed seed to Random in DivToMul (to make potential failures reproducible)
      
      * use TestLibrary.Generator.GetDouble() instead of Random
      
      * Remove Random-based values
      
      * Update utils.cpp
      
      * Update utils.cpp
      
      * Address feedback
      
      
      Commit migrated from https://github.com/dotnet/coreclr/commit/40faef69c1d9e58e170af6c139b37b3fa56e1392
      f80616ef
  22. 14 9月, 2019 1 次提交
  23. 06 8月, 2019 1 次提交
  24. 02 5月, 2019 1 次提交
  25. 26 3月, 2019 1 次提交
  26. 19 3月, 2019 1 次提交
  27. 07 2月, 2019 1 次提交
    • B
      Fix ARM64 GS with localloc · 6f356666
      Bruce Forstall 提交于
      Currently, all frame types place saved FP/LR at low addresses on the
      frame, below the GS cookie. If a function has localloc, the dynamically
      allocate and unsafe buffer will be lower than the saved FP/LR and
      not the GS cookie won't properly protect the saved FP/LR.
      
      This change introduces new frame types, used only for functions needing
      a GS cookie and using localloc, saving FP/LR along with the rest of
      the callee-saved registers at the top (highest addresses) of the frame,
      above the GS cookie.
      
      
      Commit migrated from https://github.com/dotnet/coreclr/commit/c4ac1bc112d927de89e00810ea0fff39dc92f9fe
      6f356666
  28. 22 12月, 2018 1 次提交
  29. 17 12月, 2018 1 次提交
  30. 19 11月, 2018 1 次提交
    • M
      Make type comparisons more general purpose (dotnet/coreclr#20940) · 7c592f24
      Michal Strehovský 提交于
      This has two parts:
      
      ## Part 1
      CoreRT represents native type handles differently from CoreCLR - on CoreCLR, `RuntimeTypeHandle` is a wrapper over `RuntimeType` and RyuJIT is aware of that. On CoreRT, `RuntimeTypeHandle` wraps the native type handle, not a `RuntimeType`.
      
      The knowledge is hardcoded in importer when importing the sequence "ldtoken foo / call Type.GetTypeFromHandle" - importer just removes the call and bashes the result of ldtoken to be a reference type. CoreRT had to avoid reporting `Type.GetTypeFromHandle` as an intrinsic because of that.
      
      I'm adding another helper that lets RyuJIT avoid hardcoding that knowledge. Instead of just bashing the return type, we swap the helper call.
      
      ## Part 2
      
      Native type handle equality checks need to go through a helper, unless the EE side says it's okay to compare native type handles directly.
      
      Commit migrated from https://github.com/dotnet/coreclr/commit/497419bf8f19c649d821295da7e225e55581cce9
      7c592f24
  31. 06 11月, 2018 1 次提交
  32. 24 7月, 2018 1 次提交
  33. 01 7月, 2018 1 次提交
    • M
      Pass CompAllocator by value (dotnet/coreclr#15025) · 7353f041
      mikedn 提交于
      Passing CompAllocator objects by value is advantageous because it no longer needs to be dynamically allocated and cached. CompAllocator instances can now be freely created, copied and stored, which makes adding new CompMemKind values easier.
      
      Together with other cleanup this also improves memory allocation performance by removing some extra levels of indirection that were previously required - jitstd::allocator had a pointer to CompAllocator, CompAllocator had a pointer to Compiler and Compiler finally had a pointer to ArenaAllocator. Without MEASURE_MEM_ALLOC enabled, both jitstd::allocator and CompAllocator now just contain a pointer to ArenaAllocator. When MEASURE_MEM_ALLOC is enabled CompAllocator also contains a pointer but to a MemStatsAllocator object that holds the relevant memory kind. This way CompAllocator is always pointer sized so that enabling MEASURE_MEM_ALLOC does not result in increased memory usage due to objects that store a CompAllocator instance.
      
      In order to implement this, 2 additional signficant changes have been made:
      * MemStats has been moved to ArenaAllocator, it's after all the allocator's job to maintain statistics. This also fixes some issues related to memory statistics, such as not tracking the memory allocated by the inlinee compiler (since that one used its own MemStats instance).
      * Extract the arena page pooling logic out of the allocator. It doesn't make sense to pool an allocator, it has very little state that can actually be reused and everyting else (including MemStats) needs to be reset on reuse. What really needs to be pooled is just a page of memory.
      
      Since this was touching allocation code the opportunity has been used to perform additional cleanup:
      * Remove unnecessary LSRA ListElementAllocator
      * Remove compGetMem and compGetMemArray
      * Make CompAllocator and HostAllocator more like the std allocator
      * Update HashTable to use CompAllocator
      * Update ArrayStack to use CompAllocator
      * Move CompAllocator & friends to alloc.h
      
      Commit migrated from https://github.com/dotnet/coreclr/commit/c2baf04cd2c2211334949ba12df2e49fd9109728
      7353f041
  34. 30 6月, 2018 1 次提交
  35. 23 5月, 2018 1 次提交
  36. 14 2月, 2018 1 次提交
  37. 31 1月, 2018 1 次提交
  38. 12 12月, 2017 1 次提交
  39. 26 10月, 2017 1 次提交
  40. 25 10月, 2017 1 次提交