This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH PR91137]Find base object for ivopts via walk_tree


Hi,
This patch fixes PR91137 by finding base objects with walk_tree utility.  Note we specially return
integer_zero_node when a tree expression contains multiple base objects.  This works since the
special node is compared unequal to any real base object, thus skipped in candidate selection.
This is intended to avoid propagating multiple base objects (maybe introduced by programmer).

Bootstrap and test on x86_64.  Is it OK?

Thanks,
bin
2019-07-15  Bin Cheng  <bin.linux@linux.alibaba.com>

        PR tree-optimization/91137
        * tree-ssa-loop-ivopts.c (struct ivopts_data): New field.
        (tree_ssa_iv_optimize_init, alloc_iv, tree_ssa_iv_optimize_finalize):
        Init, use and fini the above new field.
        (determine_base_object_1): New function.
        (determine_base_object): Reimplement using walk_tree.

gcc/testsuite
2019-07-15  Bin Cheng  <bin.linux@linux.alibaba.com>

        PR tree-optimization/91137
        * gcc.c-torture/execute/pr91137.c: New test.

Attachment: 0001-pr91137-20190715.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]