Mercurial > hg > graal-compiler
comparison src/share/vm/opto/memnode.cpp @ 3248:e6beb62de02d
7032963: StoreCM shouldn't participate in store elimination
Reviewed-by: kvn
author | never |
---|---|
date | Tue, 05 Apr 2011 19:14:03 -0700 |
parents | b099aaf51bf8 |
children | 92add02409c9 |
comparison
equal
deleted
inserted
replaced
2436:8f1042ff784d | 3248:e6beb62de02d |
---|---|
2157 if (p) return (p == NodeSentinel) ? NULL : p; | 2157 if (p) return (p == NodeSentinel) ? NULL : p; |
2158 | 2158 |
2159 Node* mem = in(MemNode::Memory); | 2159 Node* mem = in(MemNode::Memory); |
2160 Node* address = in(MemNode::Address); | 2160 Node* address = in(MemNode::Address); |
2161 | 2161 |
2162 // Back-to-back stores to same address? Fold em up. | 2162 // Back-to-back stores to same address? Fold em up. Generally |
2163 // Generally unsafe if I have intervening uses... | 2163 // unsafe if I have intervening uses... Also disallowed for StoreCM |
2164 if (mem->is_Store() && phase->eqv_uncast(mem->in(MemNode::Address), address)) { | 2164 // since they must follow each StoreP operation. Redundant StoreCMs |
2165 // are eliminated just before matching in final_graph_reshape. | |
2166 if (mem->is_Store() && phase->eqv_uncast(mem->in(MemNode::Address), address) && | |
2167 mem->Opcode() != Op_StoreCM) { | |
2165 // Looking at a dead closed cycle of memory? | 2168 // Looking at a dead closed cycle of memory? |
2166 assert(mem != mem->in(MemNode::Memory), "dead loop in StoreNode::Ideal"); | 2169 assert(mem != mem->in(MemNode::Memory), "dead loop in StoreNode::Ideal"); |
2167 | 2170 |
2168 assert(Opcode() == mem->Opcode() || | 2171 assert(Opcode() == mem->Opcode() || |
2169 phase->C->get_alias_index(adr_type()) == Compile::AliasIdxRaw, | 2172 phase->C->get_alias_index(adr_type()) == Compile::AliasIdxRaw, |