Skip to content

Changes

Summary

  1. Prevent commoning of l2a operations in localCSE (commit: 782146b) (details)
Commit 782146bd9fc3f1dea74443d44371fe95fb4ca964 by Henry Zongaro
Prevent commoning of l2a operations in localCSE

An l2a operation might be used to convert the result of a compressed
reference sequence to an address, but it is also used in other
circumstances - for instance, if an Int64 value holds the address of a
j9class or a j9method.  The l2aEvaluators assume that l2a is used for
compressed references or accessing arraylets.  If the node is not
accessing an arraylet and compressed references are enabled, the
evaluator will mark the source register as containing a collected
reference under the assumption that it's working with a compressed
reference.  However, if the l2a is being used for a j9class, j9method,
etc., the register that holds it should not be marked as a collected
reference.

As an interim fix, this change will prevent commoning of l2a operations.
The various OMR::<CPU>::MemoryReference::populateMemoryReference
code generation methods will skip evaluation of an l2a that has a
reference count of one, so that prevents the register containing the
operand of the l2a from being marked as a collected reference.

In the longer term, OMR issue 6508 proposes introducing a new opcode -
l2gcref - that would be used to mark explicitly the result of a
conversion from long to an address as holding a collected reference.
Once implemented, the change implemented by this commit can be reverted.
(commit: 782146b)
The file was modified compiler/optimizer/OMRLocalCSE.cpp (diff)