Check for nodes missed by remove_useless_nodes() only if PhaseRemoveUseless has
actually been run. This makes it possible to use -XX:-UseLoopSafepoints without
crashing trivially, although implicit assumptions in other parts of C2 about the
existence of loop safepoints might lead to more subtle failures for more complex
methods.
Reviewed-by: neliasso, thartmann, kvn
8248188: Add IntrinsicCandidate and API for Base64 decoding, add Power64LE intrinsic implementation.
This patch set encompasses the following commits:
Adds a new intrinsic candidate to the java.lang.Base64 class - decodeBlock(), and provides a flexible API for the intrinsic. The API is similar to the existing encodeBlock intrinsic.
Adds the code in HotSpot to check and martial the new intrinsic's arguments to the arch-specific intrinsic implementation.
Adds a Power64LE-specific implementation of the decodeBlock intrinsic.
Adds a JMH microbenchmark for both Base64 encoding and encoding.
Enhances the JTReg hotspot intrinsic "TestBase64.java" regression test to more fully test both decoding and encoding.
Reviewed-by: rriggs, mdoerr, kvn
Prevent exponential number of calls to ConvI2LNode::Ideal() when AddIs are used
multiple times by other AddIs in the optimization ConvI2L(AddI(x, y)) ->
AddL(ConvI2L(x), ConvI2L(y)). This is achieved by (1) reusing existing ConvI2Ls
if possible rather than eagerly creating new ones and (2) postponing the
optimization of newly created ConvI2Ls. Remove hook node solution introduced in
8217359, since this is subsumed by (2). Use phase->is_IterGVN() rather than
can_reshape to check if ConvI2LNode::Ideal() is called within iterative GVN, for
clarity. Add regression tests that cover different shapes and sizes of AddI
subgraphs, implicitly checking (by not timing out) that there is no
combinatorial explosion.
Co-authored-by: Vladimir Ivanov <vlivanov@openjdk.org>
Reviewed-by: vlivanov, kvn
Use the code motion trace produced by TraceOptoPipelining (excluding traces of
stubs) to assert that two compilations with the same seed cause StressLCM and
StressGCM to take the same randomized decisions. Previously, the entire output
produced by PrintOptoStatistics was used instead, which has shown to be too
fragile. Also, disable inlining in both TestStressCM.java and the similar
TestStressIGVN.java to prevent flaky behavior, and run both tests for ten
different seeds to improve coverage.
Reviewed-by: kvn, thartmann
Remove test assertion checking that different random seeds lead to different
code motion decisions. This was the case for the specific pair of random seeds,
IR fed to code motion, and target platforms tested originally; but does not need
to hold in general. Remove similar test assertion in IGVN randomization test
case. Re-enable the test case.
Reviewed-by: shade, kvn
Use the compilation-local seed in 'StressLCM' and 'StressGCM' rather than the
global one. As a consequence, these options use by default a fresh seed in every
compilation, unless 'StressSeed=N' is specified, in which case they behave
deterministically. Annotate tests that use 'StressLCM' and 'StressGCM' with the
'stress' and 'randomness' keys to reflect this change in default behavior.
Reviewed-by: kvn, thartmann
Record nodes as dead in Node::destruct() if their index cannot be directly
reclaimed. This prevents the "Live Node limit exceeded limit" assertion failure
by improving the accuracy of Compile::live_nodes() when "hook" nodes in
ConvI2LNode::Ideal() are created and deleted non-consecutively.
This addition might result in multiple calls to compile::record_dead_node() for
the same node (e.g. from PhaseIdealLoop::spinup()), but this is safe, as
compile::record_dead_node() is idempotent.
Reviewed-by: neliasso, thartmann