Age | Commit message (Collapse) | Author | Files | Lines |
|
Encapsulate live var analysis in its own class.
|
|
|
|
|
|
This change moves the implementation of live variable analysis from a
single function into a class in which the per-block portion of the
algorithm is contained in its own function. There is no functional
change.
|
|
|
|
|
|
This analysis is not necessary for correctness and does not appear to
have any impact on the generated code: in particualr, internal assembly
diffs show no changes with this analysis disabled.
For example, consider the following statement:
`(asg (lclVar V0) (add (lclVar V0) (icon 4)))`
Under the `asgdLclVar` analysis, the visit of the lclVar node that is an
operand to the add would mark the lclVar node that is the target of the
assignment with `GTF_VAR_USEDEF` and exit without adding V0 to the
current set of used lclVars. Instead, the visit of the lclVar node that
is the target of the assignment would add V0 to both the set of used
lclVar nodes and the set of defined lclVar nodes.
With this analysis disabled, the visit of the lclVar node that is an
operand to the add will add V0 to the set of used lclVar nodes and the
visit of the lclVar node that is the target of the assignment will add
V0 to the set of defined lclVar nodes. In both cases, the result is the
same.
|
|
This field was never used.
|
|
The unsigned_abs function in jit.h is implemented using labs function.
However labs has 32 bit argument / result, while the unsigned_abs expects
it to be 64 bit.
The correct function to use for FEATURE_PAL is llabs. But since we now have
abs overload for __int64 in pal.h, we can just remove the #ifdef for FEATURE_PAL
and use the same implementation for both Unix and Windows.
|
|
Add a missing ref count bump in DecomposeLclFld.
|
|
Accelerate Abs intrinsic even in cases where there is no direct instruction support available.
|
|
* Fix VSO 359733.
This bug was an assertion when extracting side effects that failed when
checking that the presence or absence of value numbers on the head of
the side effect list matched the presence or absence of value numbers on
the node being added to the list. This condition does not hold when
remorphing, as remorphing may create nodes without value numbers. In
this case, the new comma node will have no value numbers for
conservative correctness. The failing assertion was weakened to allow
the presence/absence of value numbers on the head of the list and the
node being added to differ during remorphing.
|
|
DecomposeLclFld transforms a single lclFld node into two lclFld nodes
that reference the same lclVar, but was missing a corresponding ref
count bump. This was causing a failure in JIT/Methodical/fp/exgen/10w5d_cs_do
under JITStress=1 and JITStress=2.
|
|
The issue here was that when we morphed a mod into a sub mul div, we would
ultimately decrease the ref counts to the numerator of the original mod
without performing a corresponding increase. The fix is to increase the
ref count when morphing into the sub mul div.
|
|
support available.
|
|
Fix heap live-in calculation
|
|
Fix DevDiv bug 359737.
|
|
|
|
EH normalization can leave incorrect ref counts. This caused asserts in a few
cases with the forthcoming finally cloning, as these EH related blocks were
exposed to flow optimizations.
|
|
This bug was an assertion during CSE that ensures that all CSE
candidates have value numbers. This assertion tripped because an earlier
CSE in the same tree as the faulty candidate re-morphed modulus by a
constant into a divide and subtract; the resulting tree was left without
value numbers. This change disables the problematic transform when
remorphing as part of CSE.
|
|
Update the code in liveness that sets the `fgCurHeapUse` flag (which needs
to identify whether the current block has an upwards-exposed use of the
heap) to set this unconditionally for opcodes that use the heap.
Previously, this code was avoiding setting the flag if the block has a
prior def of the heap, but in the absence of a guarantee to the contrary,
we must assume that the heap use may not alias the heap def, and so still
be upwards-exposed and cause the heap to be live-in to the block.
Also remove the OptRepeat workaround for the lack of this, in
`ResetOptAnnotations`.
Fixes #7846.
|
|
Parameter `newVNsForPhis` of method `fgValueNumberBasicBlocks` is unused;
its presence and comment are confusing/misleading. What actually happens
is that `fgValueNumberBlock` itself checks whether the value numbers for
incoming Phi args' SSA defs are defined yet or not.
|
|
|
|
targets.
|
|
Fix GT_LOCKADD register specification.
|
|
|
|
Use field type value-numbering local field stores
|
|
Method `VNPairApplySelectorsAssign` takes the type of the value being
assigned, so when processing a store to a field of a local struct, pass
the type of the field rather than the type of the local; failure to do so
was blocking propagation of the value number to subsequent loads of the
same field due to the type mismatch.
|
|
Widen basic block flag field to 64 bits
|
|
Ifdef more unused code that uses ReadProcessMemory. Move the current
memory probing in the transport to PAL_ProbeMemory. Add PAL_ProbeMemory
to dac PAL exports.
PAL_ProbeMemory may be changed to use write/read on a pipe to
validate the memory as soon as we make it perform as well as
the current code.
Remove ReadProcessMemory tests and add PAL_ProbeMemory pal tests.
|
|
Flag field is currently full, and I need at least one more bit to identify
the start of a cloned finally.
Widen to 64 bits and update a few uses. Also removed an unused copy.
|
|
Correctly sequence fgMorphModToSubMulDiv
|
|
Streamline LSRA resolution
|
|
Fix SIMD Scalar Move Encoding: VEX.L should be 0
|
|
For SIMD Scalar Move instructions such as vmovlpd, vmovlps, vmovhps,
vmovhps and vmovss on AVX system, JIT should ensure that those
instructions are encoded with VEX.L=0, because encoding them with
VEX.L=1 may encounter unpredictable behavior across different
processor generations. The reason of VEX.L is encoded with 1 is
because JIT calls compiler->getSIMDVectorType() which returns
EA_32BYTE, and it is been passed into emitter AddVexPrefix() which
ends up encoded VEX.L=1, the fix is to pass target type and base
type for those instructions to ensure that VEX.L=0 at emitter
AddVexPrefix()
Fix #8328
|
|
This method was creating a temp, but the final result was a GT_SUB with
a use of the temp as its op1, and it was not setting GTF_REVERSE_OPS.
This led to a liveness assert in LSRA.
|
|
LclVar ref counts must be incremented before attempting to remove the
morphed statement, since doing so decrements ref counts (and thus
requires refcounts to be conservatively correct).
Fixes VSO 359734.
|
|
Fix consume-order checking in codegen.
|
|
The codegen for the non-readytorun path (used on CoreCLR) requires the
runtime to support general purpose virtual method resolution based on a
method handle. CoreRT doesn't have such helpers.
|
|
Ryujit/ARM32 Initial Lowering::IsContainableImmed for ARM
|
|
|
|
The switch to LIR invalidated the correspondence between a node's
sequence number and the order in which it must be consumed with respect
to other nodes. This in turn made the consume-order checks during code
generation incorrect.
This change introduces a new field, `gtUseNum`, that is used during code
generation to check the order in which nodes are consumed. Re-enabling
these checks revealed a bug in code generation for locked instructions
on x86, which were consuming their operands out-of-order; this change
also contains a fix for that bug.
Fixes #7963.
|
|
TreeNodeInfoInitCmp attempts to eliminate the cast from
`cmp(cast<ubyte>(x), icon)` by narrowing the compare to ubyte. This should
only happen if the constant fits in a byte so it can be narrowed too,
otherwise codegen produces an int sized compare. (or a byte sized compare
with a truncated constant if we try to use GTF_RELOP_SMALL).
|
|
Initial implementation of IsContainableImmed for ARM.
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
|
|
Ryujit/ARM32: Implement Lowering::LowerCast for ARM
|
|
Simple integer to interger type conversion is passed.
Add comment for LowreCast with C++ comment style.
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
|
|
Fix to issue 8286.
|
|
Fix missing flags on GT_DYN_BLK node
|
|
Last 4K or so lines of flowgraph.cpp were not being formatted because
the clang-format on directive had a typo.
Fix the typo and reformat the latter part of the file.
|
|
|