Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
New method that add exception sets:
fgValueNumberAddExceptionSet
- fgValueNumberAddExceptionSetForIndirection
- fgValueNumberAddExceptionSetForDivision
- fgValueNumberAddExceptionSetForOverflow
- fgValueNumberAddExceptionSetForCkFinite
Refactoring work added methods:
VNEvalShouldFold - method to decide if constant folding should be performed
EvalUsingMathIdentity - Uses math identities to simplify value number exoressions
Renamed fgValueNumberHelperMethVNFunc to fgValueNumberJitHelperMethodVNFunc
Removed the suffixes from the method headers comments
|
|
Revise the exeception gernerating value number functions:
VNF_OverflowEXc, VNF_CastOvf, VNF_ARithmeticExc, VNF_DivideByZeroExc and ConvertOverflowExc
added support methods for VNNormalValue
Extended GetVNGuncForOper to support overflow operations and additional unsigned operations:
And added value number functions for
- unsigned comparisons, unsigned add, sub and mul
- overflow add, sub, mul
New method: VMCheckAscending to validate that exception sets maintain the ascending ordfer property.
New method: VMExcSetIntersection and VMExcIsSubset
Changed the constant folding logic in VNForFunc to avoid folding when the operation will unconditionally throw when folded.
Explicitly specialize some EvalOp<> calls
Added several new method headers comments in ValueNum.cpp
Clear the unsigned flag when bashing nodes into GT_COMMA or GT_NOP nodes
Removed GT_NOP and GT_COMMA cases from GetVNFuncForOper
Added enum VNOperKind
Added support for the unsigned multiply VNFunc used on 32-bit target
|
|
|
|
Integer division operators do not use GTF_UNSIGNED. There are distinct unsigned operators (GT_UDIV and GT_UMOD) and VN already handles those directly.
|
|
When the jit is generating code in debug/minopts/rare-block modes,
we'd prefer it to generate code more quickly and worry less about overall
generated code performance.
Generally speaking smaller intermediate and final code should correlate
well with faster jitting.
This change alters the expansions of box, unbox, isinst, and castclass when
generating code for minopts, debug, or in rarely run blocks. In such modes
the jit estimates whether an inline sequence or general helper call would
result in more compact code, and then chooses the smaller sequence.
This reduces generated code size around 2.5% in a variety of scenarios,
and roughly translates to a 1.5% improvement in time spent jitting.
Similar strategies can be applied to other complex operations during
importation. That work is forthcoming.
|
|
This is a pure helper w/o side-effects, so add it to the lists of
tractable helpers in value-numbering; this allows redundant calls to be
CSEd, and fixes #9552 so we can again optimize away type checks on type
parameters in generic code (a not-infrequent pattern).
|
|
Teach value numbering to keep track of the current value number for
`ByrefExposed` memory, updating it appropriately at relevant stores.
Introduce a new VN operator `ByrefExposedLoad`, used for loads of
address-exposed locals and loads by indirs that don't have more specific
value numbers, which is a function of the current `ByrefExposed` memory VN
and the pointer VN. This allows loop hoisting and CSE to recognize
redundant loads via byrefs when there are no intervening stores.
Fixes #7903.
|
|
Re-cast the notion of "heap" (in liveness, SSA, and value-numbering) as
one of potentially many `MemoryKind`s, called `GcHeap`. Update names,
comments, data structures, and signatures as appropriate to parameterize
relevant data/methods over `MemoryKind`. This change is a no-diff
refactoring, and currently `GcHeap` is the only `MemoryKind`. Generally,
codepaths which will generically need to process all `MemoryKinds`s
(initializing, dumping, dataflow propagation) now iterate over all
`MemoryKinds`, and codepaths which are sensitive to the semantics of the
specific `MemoryKind` (def/use identification in liveness and value
numbering) are changed to specifically operate on `MemoryKind::GcHeap`.
One notable exception is that `lvMemoryPerSsaData` and `CountForMemoryDef`
are *not* parameterized over `MemoryKind`; there's a single "space" of SSA
defnums for memory defs (though the same tree can incur different defs for
different memory kinds [in which case their defnums will differ]), to
facilitate subsequently sharing SSA nodes across memory kinds when
appropriate.
|
|
Before this change, value numbering produced the same value number for
each occurrence of `FieldSeqStore::NotAField`. This semantics is not
logically consistent with the semantics of `NotAField`, however:
`NotAField` indicates that we cannot reason about the address expression
that it annotates, therefore we cannot reason about the value stored at
the corresponding location. A recent change to admit the VN for
`NotAField` in `ExtendPtrVN` exposed SBCG due to this mismatch in
semantics: distinct array elements were assigned the same value number
because each had the same base coupled with the `NotAField` VN.
This change revises the representation of `NotAField` during value
numbering: instead of reusing the same value number for each
occurrence of `NotAField`, each occurrence is instead assigned a new,
unique value number. These value numbers are represented using a new
chunk attribute to retain the ability to decide whether or not a value
number represents `NotAField` without the use of a more heavyweight map
(e.g. a `VNMap`).
Fixes #8133.
|
|
Fixes dotnet/corert#2080.
|
|
Helper to get ready to run, shared, generic, static base.
|
|
This change is the result of running clang-tidy and clang-format on jit
sources.
|
|
This change starts the process of updating the jit code to make it ready
for being formatted by clang-format. Changes mostly include reflowing
comments that go past our column limit and moving comments around ifdefs
so clang-format does not modify the indentation. Additionally, some
header files are manually reformatted for pointer alignment and marked
as clang-format off so that we do not lose the current formatting.
|
|
The following ReadyToRun helpers are now treated similarly to their normal
counterparts in value numbering:
CORINFO_HELP_READYTORUN_NEW
CORINFO_HELP_READYTORUN_NEWARR_1
CORINFO_HELP_READYTORUN_ISINSTANCEOF
CORINFO_HELP_READYTORUN_CHKCAST
CORINFO_HELP_READYTORUN_STATIC_BASE
In particular, this allows CSE-ing calls to the last 3 of the above helpers when
possible. #3281 is an issue for CORINFO_HELP_READYTORUN_STATIC_BASE.
Compiler::fgValueNumberHelperCallFunc is refactored to reduce code
duplication.
Closes #3281.
|
|
|
|
http://blogs.msdn.com/b/dotnet/archive/2015/11/30/net-framework-4-6-1-is-now-available.aspx
.NET Framework list of changes in 4.6.1
https://github.com/Microsoft/dotnet/blob/master/releases/net461/dotnet461-changes.md
Additional changes including
- Working ARM64 JIT compiler
- Additional JIT Optimizations
o Tail call recursion optimization
o Array length tracking optimization
o CSE for widening casts
o Smaller encoding for RIP relative and absolute addresses in addressing modes
o Tracked Local Variable increased to 512
o Improved handling of Intrinsics System.GetType()
o Improved handling of Math intrinsics
- Work for the X86 Ryu-JIT compiler
[tfs-changeset: 1557101]
|
|
[tfs-changeset: 1421297]
|
|
[tfs-changeset: 1407945]
|