RFR(M): 8130847: Cloned object's fields observed as null after C2 escape analysis (original) (raw)
Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Jul 30 00:48:39 UTC 2015
- Previous message: RFR(M): 8130847: Cloned object's fields observed as null after C2 escape analysis
- Next message: RFR(M): 8130847: Cloned object's fields observed as null after C2 escape analysis
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 7/29/15 6:57 AM, Roland Westrelin wrote:
The next change puzzles me:
- if (!call->maymodify(tinst, phase)) { + if (call->maymodify(tinst, phase)) { - mem = call->in(TypeFunc::Memory); + assert(call->isArrayCopy(), "ArrayCopy is the only call node that doesn't make allocation escape"); Why only ArrayCopy? I think it is most of calls. What set of tests you ran? Methods naming is confusing. membarforarraycopy() does not check for membar but for calls which can modify. handlearraycopy() could be makearraycopyload(). What about: static bool maymodify(const TypeOopPtr toop, MemBarNode mb, PhaseTransform *phase); instead of membarforarraycopy() So ArrayCopyNode would have: virtual bool maymodify(const TypeOopPtr *toop, PhaseTransform *phase); and static bool maymodify(const TypeOopPtr toop, MemBarNode mb, PhaseTransform *phase); that do the same thing except the static method also looks for a graph pattern starting from a MemBar.
Yes, it is better.
Thanks, Vladimir
Roland.
Add explicit check: && strcmp(name, "unsafearraycopy") != 0) Thanks, Vladimir On 7/28/15 7:05 AM, Roland Westrelin wrote: http://cr.openjdk.java.net/~roland/8130847/webrev.00/
When an allocation which is the destination of an ArrayCopyNode is eliminated, field’s values recorded at a safepoint (to reallocate the object) do not take the ArrayCopyNode into account at all and the effect or the ArrayCopyNode is lost on a deoptimization. This fix records values from the source of the ArrayCopyNode, emitting new loads if necessary. I also use the opportunity to pin the loads generated in LoadNode::canseearraycopyvalue() because they depend on all checks that validate the array copy and not only on the check that immediately dominates. Roland.
- Previous message: RFR(M): 8130847: Cloned object's fields observed as null after C2 escape analysis
- Next message: RFR(M): 8130847: Cloned object's fields observed as null after C2 escape analysis
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list