On Tue, Jun 30, 2015 at 4:31 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Sat, Jun 27, 2015 at 5:13 AM, Jeff Law <l...@redhat.com> wrote: >> On 06/26/2015 03:02 AM, Bin Cheng wrote: >>> >>> Hi, >>> GCC avoids multi-pointers/dangling-pointers of struct iv by allocating >>> multiple copies of the structure. This patch is an obvious fix to the >>> issue >>> by managing iv structures in obstack. >>> >>> Bootstrap on x86_64, will apply to trunk if no objection. >>> >>> Thanks, >>> bin >>> >>> 2015-06-26 Bin Cheng <bin.ch...@arm.com> >>> >>> * tree-ssa-loop-ivopts.c (struct ivopts_data): New field >>> iv_obstack. >>> (tree_ssa_iv_optimize_init): Initialize iv_obstack. >>> (alloc_iv): New parameter. Allocate struct iv using >>> obstack_alloc. >>> (set_iv, find_interesting_uses_address, add_candidate_1): New >>> argument. >>> (find_interesting_uses_op): Don't duplicate struct iv. >>> (free_loop_data): Don't free iv structure explicitly. >>> (tree_ssa_iv_optimize_finalize): Free iv_obstack. >> >> Presumably you're trying to simplify the memory management here so that you >> don't have to track lifetimes of the IV structures so carefully, which in >> turn simplifies some upcoming patch? > Yes, that's exactly the reason. I am still on the way fixing > missed-optimizations in IVO, and plan to do some > refactoring/simplification afterwards. >> >> Note we don't have a "no objection" policy for this kind of patch. However, >> I think it may make sense to look into having you as a maintainer for the IV >> optimizations if you're interested. > Oh, that would be my great honor.
I'd support that. Bin has done high quality work on IVOPTs in the past and he knows when to ask questions (not that there ever were simple answers to those...). Thanks, Richard. > Thanks, > bin >> >> Jeff >>