Hi Richard, Thanks for the review. On 22/07/16 22:49, Richard Biener wrote: > On Fri, Jul 22, 2016 at 2:27 PM, kugan > wrote: >> Hi, >> >> Now that early vrp is moved as part of tree-vrp, there is only minimal >> interface tree-vrp should expose for ipa-vrp. However, I have not found the >> right place to place struct value_range (with GTY marker) and enum >> value_range_type. >> >> enum value_range_type is needed in tree-ssanames.[h|c] and in all the places >> where get|set_range_info is used. >> >> struct value_range is needed in ipa-prop.h, therefore all the places >> ipa-prop.h is included. >> >> One option is to place it in tree-vrp.h and expose this to GTY >> infrastructure. Then include it in all the places we need any of these >> types. It is in lots of c files. >> >> I have now placed both in tree.h. Even though that compiles, I am not >> convinced that is the right place. > > I'm convinced it is not ;) I totally agree. I just kept it their for the time being. > > 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 ? > Or simply put value_range into tree-vrp.h and leave value_range_type > where it is. In this case, we will have to add tree-vrp.h and tree-ssanames.h in those places. > > You no longer export vrp_finalize so no need to change it. Thanks, Kugan