Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information