RFR (L): 7173584: Implement arraycopy as a macro node (original) (raw)
Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Sep 28 15:05:11 PDT 2012
- Previous message: RFR (L): 7173584: Implement arraycopy as a macro node
- Next message: hotspot heap and L1 and L2 cache misses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thank you for the case. I did go through the code and this change looks fine.
Thanks, Vladimir
Roland Westrelin wrote:
Vladimir,
Thanks for taking a look at this.
I am not comfortable with this predicate change. The check come from generatelimitguard() :
if (a.length u< offset+copylength) uncommontrap; else arraycopy; which is reversed by igvn to if (offset+copylength u< a.length) arraycopy; else uncommontrap; So it should not be IfFalse projection. Can you explain the case which you hit? This is the java code that triggers this: for (int i=0; i<a1.length; i++) { a2 = new …[a3.length+a1.length-i-1]; System.arraycopy(a3, 0, a2, 0, a3.length); System.arraycopy(a1, i+1, a2, a3.length, a1.length-i-1); } For the first arraycopy, one of the check is: if (a2.length < a3.length) uncommontrap; else arraycopy; if (a3.length + a1.length-i-1 < a3.length) uncommontrap; else arraycopy; a1.length is 5 if (a3.length + 4 - i < a3.length) uncommontrap; else arraycopy; a3.length is a loop invariant. Also instead of duplicating gensubtypecheck() in macroArrayCopy.cpp can you modify the original one to work for you (by passing additional flag)? Ok I'll do that. Roland.
- Previous message: RFR (L): 7173584: Implement arraycopy as a macro node
- Next message: hotspot heap and L1 and L2 cache misses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list