StoreCM Optimization
Tom Rodriguez
Thomas.Rodriguez at Sun.COM
Mon Aug 31 11:11:08 PDT 2009
I don't think so. Because of optimizations, couldn't the input be
another memory state that merges multiple stores that are sharing the
card mark? I seem to remember an old email exchange about this but I
can't find it now.
tom
On Aug 31, 2009, at 10:41 AM, Changpeng Fang wrote:
> Is it safe to simply remove the storeCM node if its OopStore is not
> a store?
>
> diff -r d0acbc302e14 src/share/vm/opto/memnode.cpp
> --- a/src/share/vm/opto/memnode.cpp Mon Aug 17 14:45:02 2009 -0700
> +++ b/src/share/vm/opto/memnode.cpp Mon Aug 31 10:34:15 2009 -0700
> @@ -2309,7 +2309,7 @@ Node *StoreCMNode::Identity( PhaseTransf
> //------------------------------
> Identity---------------------------------------
> Node *StoreCMNode::Identity( PhaseTransform *phase ) {
> // No need to card mark when storing a null ptr
> Node* my_store = in(MemNode::OopStore);
> if (my_store->is_Store()) {
> const Type *t1 = phase->type( my_store->in(MemNode::ValueIn) );
> if( t1 == TypePtr::NULL_PTR ) {
> return in(MemNode::Memory);
> }
> - }
> +} else return in(MemNode::Memory);
> return this;
> }
>
>
> Thanks,
>
> Changpeng
More information about the hotspot-compiler-dev
mailing list