Skip to content

Changes

Summary

  1. Make _targetTrees field into a local allocated in StackMemoryRegion (commit: 149b872) (details)
Commit 149b87236bf890ad3e39dffdd71bd17d69102cd7 by Henry Zongaro
Make _targetTrees field into a local allocated in StackMemoryRegion

The _targetTrees List is used to keep track of TR::TreeTops that are
being processed.  In applying the optimization to requested blocks, the
DeadTreesElimination::process(TR::TreeTop*,TR::TreeTop*) method is
called for all TR::TreeTops in an entire extended basic block;
otherwise it is called for all TR::TreeTops in the method.

After the process method returns, TR:TreeTops in that range will not
need to be visited again during the current application of Dead Trees
Elimination, so there's no need to track them in a _targetTrees field
associated with the optimization.  Instead the field can be made into a
local variable in the process method, with memory allocated in the in
scope StackMemoryRegion object.

The TreeInfo objects that are stored in the List by the
findOrCreateTreeInfo function should be allocated from the same
TR::Region that the List uses for allocation of its nodes to ensure that
their lifetime is as long as that of the containing List object.
(commit: 149b872)
The file was modified compiler/optimizer/DeadTreesElimination.cpp (diff)
The file was modified compiler/optimizer/DeadTreesElimination.hpp (diff)