Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/macro.cpp @ 1080:7c57aead6d3e
6892658: C2 should optimize some stringbuilder patterns
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Thu, 12 Nov 2009 09:24:21 -0800 |
parents | fc4be448891f |
children | f96a1a986f7b |
comparison
equal
deleted
inserted
replaced
1078:8e7adf982378 | 1080:7c57aead6d3e |
---|---|
910 | 910 |
911 if (!scalar_replacement(alloc, safepoints)) { | 911 if (!scalar_replacement(alloc, safepoints)) { |
912 return false; | 912 return false; |
913 } | 913 } |
914 | 914 |
915 CompileLog* log = C->log(); | |
916 if (log != NULL) { | |
917 Node* klass = alloc->in(AllocateNode::KlassNode); | |
918 const TypeKlassPtr* tklass = _igvn.type(klass)->is_klassptr(); | |
919 log->head("eliminate_allocation type='%d'", | |
920 log->identify(tklass->klass())); | |
921 JVMState* p = alloc->jvms(); | |
922 while (p != NULL) { | |
923 log->elem("jvms bci='%d' method='%d'", p->bci(), log->identify(p->method())); | |
924 p = p->caller(); | |
925 } | |
926 log->tail("eliminate_allocation"); | |
927 } | |
928 | |
915 process_users_of_allocation(alloc); | 929 process_users_of_allocation(alloc); |
916 | 930 |
917 #ifndef PRODUCT | 931 #ifndef PRODUCT |
918 if (PrintEliminateAllocations) { | 932 if (PrintEliminateAllocations) { |
919 if (alloc->is_AllocateArray()) | 933 if (alloc->is_AllocateArray()) |
920 tty->print_cr("++++ Eliminated: %d AllocateArray", alloc->_idx); | 934 tty->print_cr("++++ Eliminated: %d AllocateArray", alloc->_idx); |
921 else | 935 else |
922 tty->print_cr("++++ Eliminated: %d Allocate", alloc->_idx); | 936 tty->print_cr("++++ Eliminated: %d Allocate", alloc->_idx); |
923 } | 937 } |
924 #endif | 938 #endif |
925 | 939 |
926 return true; | 940 return true; |
927 } | 941 } |
928 | 942 |
1637 if (next_edge) i++; | 1651 if (next_edge) i++; |
1638 } // for (uint i = 0; i < oldbox->outcnt();) | 1652 } // for (uint i = 0; i < oldbox->outcnt();) |
1639 } // if (!oldbox->is_eliminated()) | 1653 } // if (!oldbox->is_eliminated()) |
1640 } // if (alock->is_Lock() && !lock->is_coarsened()) | 1654 } // if (alock->is_Lock() && !lock->is_coarsened()) |
1641 | 1655 |
1656 CompileLog* log = C->log(); | |
1657 if (log != NULL) { | |
1658 log->head("eliminate_lock lock='%d'", | |
1659 alock->is_Lock()); | |
1660 JVMState* p = alock->jvms(); | |
1661 while (p != NULL) { | |
1662 log->elem("jvms bci='%d' method='%d'", p->bci(), log->identify(p->method())); | |
1663 p = p->caller(); | |
1664 } | |
1665 log->tail("eliminate_lock"); | |
1666 } | |
1667 | |
1642 #ifndef PRODUCT | 1668 #ifndef PRODUCT |
1643 if (PrintEliminateLocks) { | 1669 if (PrintEliminateLocks) { |
1644 if (alock->is_Lock()) { | 1670 if (alock->is_Lock()) { |
1645 tty->print_cr("++++ Eliminating: %d Lock", alock->_idx); | 1671 tty->print_cr("++++ Eliminating: %d Lock", alock->_idx); |
1646 } else { | 1672 } else { |