Mercurial > hg > truffle
comparison src/share/vm/opto/memnode.cpp @ 36:f34d9da7acb2
6667618: disable LoadL->ConvL2I ==> LoadI optimization
Summary: this optimization causes problems (sizes of Load and Store nodes do not match) for objects initialization code and Escape Analysis
Reviewed-by: jrose, never
author | kvn |
---|---|
date | Fri, 29 Feb 2008 19:57:41 -0800 |
parents | d5fc211aea19 |
children | d821d920b465 |
comparison
equal
deleted
inserted
replaced
35:e2ae28d2ce91 | 36:f34d9da7acb2 |
---|---|
106 if( t_adr == Type::TOP ) return NodeSentinel; // caller will return NULL | 106 if( t_adr == Type::TOP ) return NodeSentinel; // caller will return NULL |
107 | 107 |
108 // Avoid independent memory operations | 108 // Avoid independent memory operations |
109 Node* old_mem = mem; | 109 Node* old_mem = mem; |
110 | 110 |
111 if (mem->is_Proj() && mem->in(0)->is_Initialize()) { | 111 // The code which unhooks non-raw memories from complete (macro-expanded) |
112 InitializeNode* init = mem->in(0)->as_Initialize(); | 112 // initializations was removed. After macro-expansion all stores catched |
113 if (init->is_complete()) { // i.e., after macro expansion | 113 // by Initialize node became raw stores and there is no information |
114 const TypePtr* tp = t_adr->is_ptr(); | 114 // which memory slices they modify. So it is unsafe to move any memory |
115 uint alias_idx = phase->C->get_alias_index(tp); | 115 // operation above these stores. Also in most cases hooked non-raw memories |
116 // Free this slice from the init. It was hooked, temporarily, | 116 // were already unhooked by using information from detect_ptr_independence() |
117 // by GraphKit::set_output_for_allocation. | 117 // and find_previous_store(). |
118 if (alias_idx > Compile::AliasIdxRaw) { | |
119 mem = init->memory(alias_idx); | |
120 // ...but not with the raw-pointer slice. | |
121 } | |
122 } | |
123 } | |
124 | 118 |
125 if (mem->is_MergeMem()) { | 119 if (mem->is_MergeMem()) { |
126 MergeMemNode* mmem = mem->as_MergeMem(); | 120 MergeMemNode* mmem = mem->as_MergeMem(); |
127 const TypePtr *tp = t_adr->is_ptr(); | 121 const TypePtr *tp = t_adr->is_ptr(); |
128 uint alias_idx = phase->C->get_alias_index(tp); | 122 uint alias_idx = phase->C->get_alias_index(tp); |