This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC][IPA-VRP] Re-factor tree-vrp to factor out common code
- From: kugan <kugan dot vivekanandarajah at linaro dot org>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Martin Jambor <mjambor at suse dot cz>
- Date: Wed, 17 Aug 2016 08:20:26 +1000
- Subject: Re: [RFC][IPA-VRP] Re-factor tree-vrp to factor out common code
- Authentication-results: sourceware.org; auth=none
- References: <57886949.8010300@linaro.org> <57886A2A.4070703@linaro.org> <21d3ea50-a799-0b5b-4736-3beeca7860c4@linaro.org> <CAFiYyc2HbM2KvVuBBQ0v-7yeLUpxE6wn4PJGOAjGC5wVPBAJ-g@mail.gmail.com> <89a0bb8c-2744-49c5-8c4b-e2b4e92a26c3@linaro.org> <64f0e8a8-a933-53ff-bc60-e21db86f2608@linaro.org> <83dbcfbd-8e81-7df9-3519-5f98a332dfd2@linaro.org> <CAFiYyc1HuvxR4emJJy5KJX45NtJu4g0Gg+c1e74C09GJPhKM7g@mail.gmail.com>
Hi,
On 16/08/16 21:56, Richard Biener wrote:
On Tue, Aug 16, 2016 at 10:09 AM, kugan
<kugan.vivekanandarajah@linaro.org> wrote:
On 23/07/16 20:12, kugan wrote:
Hi Richard,
As we had value_range_type in tree-ssanames.h why not put value_range
there?
For IPA_VRP, we now need value_range used in ipa-prop.h (in ipa-vrp
patch). Based on this, attached patch now adds struct value_range to
tree-ssanames.h and fixes the header files. Please note that I also had
to add other headers in few places due to the dependency. Are you OK
with this ?
Here is alternate patch where we keep struct value_range and enum
value_range_type to tree-vrp.h. May be it is a better approach? Please
let me know what is your preference.
Ping?
This patch places value_range_type and value_range in tree-vrp.h. May be
this is better?
Alternate patch which keeps value_range_type and value_range in
tree-ssanames.h is in:
https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01491.html
I also added the necessary header files changed needed for ipa-vrp as part
of this patch so that changes needed are clear.
I think tree-vrp.h is a better place. Please don't export functions
you don't need
(the _1 helpers).
Agreed.
I have exported the following for now:
+extern void vrp_intersect_ranges (value_range *vr0, value_range *vr1);
+extern void vrp_meet (value_range *vr0, const value_range *vr1);
+extern void dump_value_range (FILE *, const value_range *);
It might be useful to add vrp_unary_op, vrp_binary_op on value_range.
But that is for later if that is needed.
I still believe sharing vrp_initialize/finalize is wrong and the
lattice setup / teardown
should be split out.
I have done that too as part of the early-vrp patch in:
https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01155.html
I just wanted to focus on the functionality required for the IPA-VRP on
this patch.
Thanks,
Kugan