Mercurial > hg > truffle
comparison src/share/vm/opto/macro.cpp @ 7637:b30b3c2a0cf2
6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
Summary: Use SSE4.2 and AVX2 instructions for encodeArray intrinsic.
Reviewed-by: roland
author | kvn |
---|---|
date | Tue, 22 Jan 2013 15:34:16 -0800 |
parents | 2aff40cb4703 |
children | 8651f608fea4 |
comparison
equal
deleted
inserted
replaced
7636:a7114d3d712e | 7637:b30b3c2a0cf2 |
---|---|
359 else | 359 else |
360 return alloc->in(TypeFunc::Memory); // It will produce zero value (see callers). | 360 return alloc->in(TypeFunc::Memory); // It will produce zero value (see callers). |
361 } | 361 } |
362 // Otherwise skip it (the call updated 'mem' value). | 362 // Otherwise skip it (the call updated 'mem' value). |
363 } else if (mem->Opcode() == Op_SCMemProj) { | 363 } else if (mem->Opcode() == Op_SCMemProj) { |
364 assert(mem->in(0)->is_LoadStore(), "sanity"); | 364 mem = mem->in(0); |
365 const TypePtr* atype = mem->in(0)->in(MemNode::Address)->bottom_type()->is_ptr(); | 365 Node* adr = NULL; |
366 if (mem->is_LoadStore()) { | |
367 adr = mem->in(MemNode::Address); | |
368 } else { | |
369 assert(mem->Opcode() == Op_EncodeISOArray, "sanity"); | |
370 adr = mem->in(3); // Destination array | |
371 } | |
372 const TypePtr* atype = adr->bottom_type()->is_ptr(); | |
366 int adr_idx = Compile::current()->get_alias_index(atype); | 373 int adr_idx = Compile::current()->get_alias_index(atype); |
367 if (adr_idx == alias_idx) { | 374 if (adr_idx == alias_idx) { |
368 assert(false, "Object is not scalar replaceable if a LoadStore node access its field"); | 375 assert(false, "Object is not scalar replaceable if a LoadStore node access its field"); |
369 return NULL; | 376 return NULL; |
370 } | 377 } |
371 mem = mem->in(0)->in(MemNode::Memory); | 378 mem = mem->in(MemNode::Memory); |
372 } else { | 379 } else { |
373 return mem; | 380 return mem; |
374 } | 381 } |
375 assert(mem != orig_mem, "dead memory loop"); | 382 assert(mem != orig_mem, "dead memory loop"); |
376 } | 383 } |
443 if (val == NULL) { | 450 if (val == NULL) { |
444 return NULL; | 451 return NULL; |
445 } | 452 } |
446 values.at_put(j, val); | 453 values.at_put(j, val); |
447 } else if (val->Opcode() == Op_SCMemProj) { | 454 } else if (val->Opcode() == Op_SCMemProj) { |
448 assert(val->in(0)->is_LoadStore(), "sanity"); | 455 assert(val->in(0)->is_LoadStore() || val->in(0)->Opcode() == Op_EncodeISOArray, "sanity"); |
449 assert(false, "Object is not scalar replaceable if a LoadStore node access its field"); | 456 assert(false, "Object is not scalar replaceable if a LoadStore node access its field"); |
450 return NULL; | 457 return NULL; |
451 } else { | 458 } else { |
452 #ifdef ASSERT | 459 #ifdef ASSERT |
453 val->dump(); | 460 val->dump(); |