Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/escape.cpp @ 20572:87f199a9c1b1
8058825: EA: ConnectionGraph::split_unique_types does incorrect scalar replacement
Reviewed-by: kvn
author | vlivanov |
---|---|
date | Mon, 29 Sep 2014 11:46:05 -0700 |
parents | 166d744df0de |
children | 90297adbda9d |
comparison
equal
deleted
inserted
replaced
20571:1d6eb209432a | 20572:87f199a9c1b1 |
---|---|
2837 // (reflection allocation), the object can't be restored during | 2837 // (reflection allocation), the object can't be restored during |
2838 // deoptimization without precise type. | 2838 // deoptimization without precise type. |
2839 continue; | 2839 continue; |
2840 } | 2840 } |
2841 } | 2841 } |
2842 | |
2843 const TypeOopPtr *t = igvn->type(n)->isa_oopptr(); | |
2844 if (t == NULL) | |
2845 continue; // not a TypeOopPtr | |
2846 if (!t->klass_is_exact()) | |
2847 continue; // not an unique type | |
2848 | |
2842 if (alloc->is_Allocate()) { | 2849 if (alloc->is_Allocate()) { |
2843 // Set the scalar_replaceable flag for allocation | 2850 // Set the scalar_replaceable flag for allocation |
2844 // so it could be eliminated. | 2851 // so it could be eliminated. |
2845 alloc->as_Allocate()->_is_scalar_replaceable = true; | 2852 alloc->as_Allocate()->_is_scalar_replaceable = true; |
2846 } | 2853 } |
2855 // - non-escaping | 2862 // - non-escaping |
2856 // - eligible to be a unique type | 2863 // - eligible to be a unique type |
2857 // - not determined to be ineligible by escape analysis | 2864 // - not determined to be ineligible by escape analysis |
2858 set_map(alloc, n); | 2865 set_map(alloc, n); |
2859 set_map(n, alloc); | 2866 set_map(n, alloc); |
2860 const TypeOopPtr *t = igvn->type(n)->isa_oopptr(); | 2867 const TypeOopPtr* tinst = t->cast_to_instance_id(ni); |
2861 if (t == NULL) | |
2862 continue; // not a TypeOopPtr | |
2863 const TypeOopPtr* tinst = t->cast_to_exactness(true)->is_oopptr()->cast_to_instance_id(ni); | |
2864 igvn->hash_delete(n); | 2868 igvn->hash_delete(n); |
2865 igvn->set_type(n, tinst); | 2869 igvn->set_type(n, tinst); |
2866 n->raise_bottom_type(tinst); | 2870 n->raise_bottom_type(tinst); |
2867 igvn->hash_insert(n); | 2871 igvn->hash_insert(n); |
2868 record_for_optimizer(n); | 2872 record_for_optimizer(n); |