Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Improve const return block placement
|
|
Remove redundant zero-initialization of struct temps with GC fields.
Structs with GC pointer fields are fully zero-initialized in the prolog if compInitMem is true.
Therefore, we don't need to insert zero-initialization for the result of newobj or for inlinee locals
when they are structs with GC pointer fields and the basic bock is not in a loop.
|
|
|
|
Tweak a few things so that generated constant return blocks get laid out
more optimally:
- Don't set BBF_DONT_REMOVE on them; it's ok to move them around, and
if all references to them get dropped, it's fine to eliminate them.
- Insert them immediately after their lexically-last predecessor when
generating them; this increases the likelihood of using fallthrough
rather than gotos to target them in the face of fgReorderBlocks'
reticence to reorder code that we don't have IBC data for and that
hasn't been marked rare.
- Make fgReorderBlocks slightly more aggressive for a pattern that now
shows up somewhat routinely for returning compound conditionals from
predicate functions.
|
|
Check for calls to `Enum.HasFlag` using the new named intrinsic support
introduced in #13815. Implement a simple recognizer for these named
intrinsics (currently just recognizing `Enum.HasFlag`).
When the call is recognized, optimize if both operands are boxes with
compatible types and both boxes can be removed. The optimization changes the
call to a simple and/compare tree on the underlying enum values.
To accomplish this, generalize the behavior of `gtTryRemoveBoxUpstreamEffects`
to add a "trial removal" mode and to optionally suppress narrowing of the
copy source.
Invoke the optimization during importation (which will catch most cases) and
again during morph (to get the post-inline cases).
Added test cases. Suprisingly there were almost no uses of HasFlag in the
current CoreCLR test suite.
Closes #5626.
|
|
The former is only necessary if it is set on any of the call's
arguments; the latter is necessary if the call may throw or if it is set
on any of the call's arguments.
Fixes DevDiv 491211.
|
|
Fix VSO 487701 and 487702.
|
|
Do not remove NOPs used by calls.
|
|
The JIT enforces a limit on the number of epilogs emitted in any given
method. Change the logic so that when this merging kicks in, returns of
constant values are given merged return blocks distinct from each other
and from the general return block, as long as we can do so without going
over the limit. This particularly helps avoid redundancy (while still
keeping method size down) in methods with a large number of constant
returns but only a few distinct constants, which is true of many
predicate methods with bool return type.
This is the compiler portion of #13466 and dotnet/corefx#23395.
|
|
Both of these issues stem from attempting to unassign a copied interval
from the copied-to register and then reassigning the interval to the
same. This corrupts some of the bookkeeping necessary to track whether
or not the interval in the register needs to be spilled, and the RA ends
up attempting to spill the interval being allocated even though it is
not assigned a register.
|
|
|
|
|
|
* separate sources into 2 files: for 32 and for 64.
|
|
Repro test. Fix and additional assert.
|
|
* Fix access order for double pointer
* Reinforce test to catch more errors
|
|
Provided call sig has default callling convention. Added test case.
Continuation of #12714.
|
|
add test dependency xml files
|
|
|
|
* [WIP] Changed event provider to user String identifiers
* [WIP] Remove GUID from generated code
* [WIP] Many small fixes
* [WIP] Fix error in constructing GUID
* Pass EventSource to abstract away GUID/Name references
* Fix various small errors
* Delay construction of SString objects
* Change GUIDs to names
* Change hardcoded GUID strings to names
* Revert testing changes
* Remove extra line
* Use the EventSource name
* Use provider full names
* Use full-names for Rundown
* Bump version number for eventpipe file
* Address review comments
|
|
|
|
Tests for #13056
|
|
Add perf test (making cards) to coreclr
|
|
|
|
Just what it says on the tin. Should fix #13697.
|
|
Loop construction has a check for the case that an in-loop block has a
`bbNext` block that is a new block but not visited in the loop flow
walk; make sure that check fires for `entry` as well as other loop
blocks.
Fixes #13507.
|
|
|
|
fgMorphCast thinks that casting a i1 value to i2 via conv.ovf.i2.un is a widening conversion and removes the overflow check. But this is in fact a narrowing conversion because i1 is implicitly sign extended to i4 and then i4 is treated as u4. Going from i4 to u4 overflows for negative values so we can't treat the source type of the cast as i1, it has to be u4.
Of course, the existing code works fine if the source type is unsigned. Going from u1 to i4 and then to u4 never overflows so it's safe to treat the source type as u1.
|
|
* Refactor AsSpan to AsReadOnlySpan
* Updated usages.
* Renamed test methods.
* Bring back AsSpan as obsolete method.
|
|
Reprioritize tests to improve inner-loop throughput.
|
|
- IlLink scenario will run on a VM (currently it is only measuring MSIL size)
- Updated the patterns of files to search for on scenario runs
- Updated the JitBench commit hash being used ()
- Disable min_opt from the PR correctness mode.
- String was not being interpolated.
|
|
I'm seeing the affected code take the `impDevirtualizeCall` code path
with `CT_INDIRECT` calls. `gtCallMethHnd` is a `GenTreePtr` in that case
(it's a union) and passing that as as `CORINFO_METHOD_HANDLE` leads
to bad things.
|
|
|
|
* [WIP] Eliminate extra buffer copy with new api path
* Copy blobs to a flat buffer is Rundown is on
* Refactor to use payload class and dedupe code
* Add contracts
* Fix many small errors
* Make names unambiguous
* Add EventPipe::WriteEventBlob to ecalllist.h
* Address code review
* Add test and fix a buffer copy bug
* Copy data instead of data pointer
* Add optional output file arg to tests
* Change failure return code
* Renamed variables for clarity
|
|
|
|
|
|
Add InnerIterationCount to layout benchmarks
|
|
These tests were too short-running to measure effectively. Add an inner
iteration count that makes the running time around 1 second (measured
locally).
|
|
Fix incorrect switch temp lcl type
|
|
|
|
[Unix x64|Arm64] Correct canfastTailCall decisions
|
|
|
|
Make unit tests run clean with tiered compilation
|
|
This reverts commit 7a386da8fc7067978a880445555942ccc6343be8.
|
|
Re-port test project changes from release/2.0.0 to master
|
|
This will change how the fastTailCall decision is made for x64 unix and arm64.
Before this change the decision was based on the amount of incoming and outgoing
caller arguments like on Windows. This was incorrect on Unix x64 and Arm64
because one argument does not translate to one register or one stack slot use.
Before this change structs on Arm64 and Amd64 Unix could
pessimize when we could fastTailCall if they were engregisterable
and took more than one register.
This change also fixes several cases when determining to fastTailCall. It fixes
#12479 and will cause a no fastTailCalls decisions for case #12468.
In addition this change adds several regression cases for #12479 and #12468. It
includes more logging ofr fastTailCall decisions, including a new COMPlus
variable named COMPlus_JitReportFastTailCallDecisions, which can be toggled with
COMPlus_JitReportFastTailCallDecisions=1.
|
|
|
|
|
|
Rearrange basic blocks during loop identification so that loop bodies
are kept contiguous when possible. Blocks in the lexical range of the
loop which do not participate in the flow cycle (which typically
correspond to code associated with early exits using `break` or
`return`) are moved out below the loop when possible without breaking EH
region nesting. The target insertion point, when possible, is chosen to
be the first spot below the loop that will not break up fall-through.
Layout can significantly affect the performance of loops, particularly
small search loops, by avoiding the taken branch on the hot path,
improving the locality of the code fetched while iterating the loop, and
potentially aiding loop stream detection.
Resolves #9692.
|
|
This reverts commit b2b5fef27a4cb68571549f2e19660f39bd76467b.
|