RFR(M): 8182471: [MVT] Eliminate redundant value type allocations

Tobias Hartmann tobias.hartmann at oracle.com
Mon Jun 26 10:53:00 UTC 2017

Hi Roland,

On 23.06.2017 11:13, Roland Westrelin wrote:
> callnode.hpp
> 849     fields[ValueNode]   = Type::TOP;
> Type::TOP is strange here. Type::BOTTOM instead?

Right, I changed it to BOTTOM.

> Shouldn't remove_redundant_allocations() be called from
> split_if_with_blocks_post instead? As it is, you're potentially
> disconnecting the allocation and split_if_with_blocks_pre will try to
> follow its uses so wouldn't it stop halfway through the graph?

Yes, you are right. I moved the code to split_if_with_blocks_post().

> Why do you need the dead_allocations list in
> ValueTypeNode::remove_redundant_allocations()?

That's necessary to not corrupt the DUIterator_Fast which "Allows deletion from the out array only at the current point" but replacing an AllocateNode may cut off multiple edges from the ValueTypesNode (debug information edges).

Updated webrev:


More information about the valhalla-dev mailing list