Mercurial > hg > graal-compiler
comparison src/share/vm/opto/memnode.cpp @ 4778:35acf8f0a2e4
7128352: assert(obj_node == obj) failed
Summary: Compare uncasted object nodes.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 10 Jan 2012 18:05:38 -0800 |
parents | 1dc233a8c7fe |
children | 53a127075045 |
comparison
equal
deleted
inserted
replaced
4777:e9a5e0a812c8 | 4778:35acf8f0a2e4 |
---|---|
2199 | 2199 |
2200 // Back-to-back stores to same address? Fold em up. Generally | 2200 // Back-to-back stores to same address? Fold em up. Generally |
2201 // unsafe if I have intervening uses... Also disallowed for StoreCM | 2201 // unsafe if I have intervening uses... Also disallowed for StoreCM |
2202 // since they must follow each StoreP operation. Redundant StoreCMs | 2202 // since they must follow each StoreP operation. Redundant StoreCMs |
2203 // are eliminated just before matching in final_graph_reshape. | 2203 // are eliminated just before matching in final_graph_reshape. |
2204 if (mem->is_Store() && phase->eqv_uncast(mem->in(MemNode::Address), address) && | 2204 if (mem->is_Store() && mem->in(MemNode::Address)->eqv_uncast(address) && |
2205 mem->Opcode() != Op_StoreCM) { | 2205 mem->Opcode() != Op_StoreCM) { |
2206 // Looking at a dead closed cycle of memory? | 2206 // Looking at a dead closed cycle of memory? |
2207 assert(mem != mem->in(MemNode::Memory), "dead loop in StoreNode::Ideal"); | 2207 assert(mem != mem->in(MemNode::Memory), "dead loop in StoreNode::Ideal"); |
2208 | 2208 |
2209 assert(Opcode() == mem->Opcode() || | 2209 assert(Opcode() == mem->Opcode() || |
2272 Node* adr = in(MemNode::Address); | 2272 Node* adr = in(MemNode::Address); |
2273 Node* val = in(MemNode::ValueIn); | 2273 Node* val = in(MemNode::ValueIn); |
2274 | 2274 |
2275 // Load then Store? Then the Store is useless | 2275 // Load then Store? Then the Store is useless |
2276 if (val->is_Load() && | 2276 if (val->is_Load() && |
2277 phase->eqv_uncast( val->in(MemNode::Address), adr ) && | 2277 val->in(MemNode::Address)->eqv_uncast(adr) && |
2278 phase->eqv_uncast( val->in(MemNode::Memory ), mem ) && | 2278 val->in(MemNode::Memory )->eqv_uncast(mem) && |
2279 val->as_Load()->store_Opcode() == Opcode()) { | 2279 val->as_Load()->store_Opcode() == Opcode()) { |
2280 return mem; | 2280 return mem; |
2281 } | 2281 } |
2282 | 2282 |
2283 // Two stores in a row of the same value? | 2283 // Two stores in a row of the same value? |
2284 if (mem->is_Store() && | 2284 if (mem->is_Store() && |
2285 phase->eqv_uncast( mem->in(MemNode::Address), adr ) && | 2285 mem->in(MemNode::Address)->eqv_uncast(adr) && |
2286 phase->eqv_uncast( mem->in(MemNode::ValueIn), val ) && | 2286 mem->in(MemNode::ValueIn)->eqv_uncast(val) && |
2287 mem->Opcode() == Opcode()) { | 2287 mem->Opcode() == Opcode()) { |
2288 return mem; | 2288 return mem; |
2289 } | 2289 } |
2290 | 2290 |
2291 // Store of zero anywhere into a freshly-allocated object? | 2291 // Store of zero anywhere into a freshly-allocated object? |