Mercurial > hg > truffle
comparison src/share/vm/opto/macro.cpp @ 3282:149bb459be66
7029167: add support for conditional card marks
Reviewed-by: iveresov, kvn
author | never |
---|---|
date | Wed, 27 Apr 2011 15:40:36 -0700 |
parents | b1a2afa37ec4 |
children | bad7ecd0b6ed |
comparison
equal
deleted
inserted
replaced
3281:273b56978029 | 3282:149bb459be66 |
---|---|
219 if (!UseG1GC) { | 219 if (!UseG1GC) { |
220 // vanilla/CMS post barrier | 220 // vanilla/CMS post barrier |
221 Node *shift = p2x->unique_out(); | 221 Node *shift = p2x->unique_out(); |
222 Node *addp = shift->unique_out(); | 222 Node *addp = shift->unique_out(); |
223 for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) { | 223 for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) { |
224 Node *st = addp->last_out(j); | 224 Node *mem = addp->last_out(j); |
225 assert(st->is_Store(), "store required"); | 225 if (UseCondCardMark && mem->is_Load()) { |
226 _igvn.replace_node(st, st->in(MemNode::Memory)); | 226 assert(mem->Opcode() == Op_LoadB, "unexpected code shape"); |
227 // The load is checking if the card has been written so | |
228 // replace it with zero to fold the test. | |
229 _igvn.replace_node(mem, intcon(0)); | |
230 continue; | |
231 } | |
232 assert(mem->is_Store(), "store required"); | |
233 _igvn.replace_node(mem, mem->in(MemNode::Memory)); | |
227 } | 234 } |
228 } else { | 235 } else { |
229 // G1 pre/post barriers | 236 // G1 pre/post barriers |
230 assert(p2x->outcnt() == 2, "expects 2 users: Xor and URShift nodes"); | 237 assert(p2x->outcnt() == 2, "expects 2 users: Xor and URShift nodes"); |
231 // It could be only one user, URShift node, in Object.clone() instrinsic | 238 // It could be only one user, URShift node, in Object.clone() instrinsic |