Commit Graph

4 Commits

Author SHA1 Message Date
Roland Westrelin
d93293f31b 8256730: Code that uses Object.checkIndex() range checks doesn't optimize well
Reviewed-by: vlivanov, thartmann
2020-12-10 08:09:08 +00:00
Roberto Castañeda Lozano
432c387e21 8254317: C2: Resource consumption of ConvI2LNode::Ideal() grows exponentially
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
2020-11-11 10:18:36 +00:00
Roberto Castañeda Lozano
a191c586dc 8253404: C2: assert(C->live_nodes() <= C->max_node_limit()) failed: Live Node limit exceeded limit
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
2020-10-08 12:30:38 +00:00
Tobias Hartmann
aff41433b6 8234617: C1: Incorrect result of field load due to missing narrowing conversion
Emit an explicit conversion to get the correct field value after the write.

Reviewed-by: vlivanov, mdoerr
2019-12-03 08:29:04 +01:00