Re: [COMMITTED] Export global ranges during the VRP block walk.

2022-05-14 Thread Iain Sandoe via Gcc-patches
Hi Andrew, Toon,

> On 14 May 2022, at 09:09, Toon Moene  wrote:
> On 5/14/22 10:00, Iain Sandoe via Gcc-patches wrote:
>>> On 13 May 2022, at 14:58, Andrew MacLeod via Gcc-patches 
>>>  wrote:
>>> 
>>> VRP currently searches the ssa_name list for globals to exported after it  
>>> finishes running. This change simply exports globals as they are calculated 
>>> for the final time during the DOM walk.
>>> 
>>> This avoid the occasional awkwardness of determined what ssa-names in the 
>>> list are important, as well as allowing forthcoming side-effect code to 
>>> adjust what is currently known as a global value during the walk without 
>>> affecting the values exported for the entire function.
>>> 
>>> Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed.
>> This (r13-436-gaf34279921f4) appears to cause or expose a problem which 
>> breaks bootstrap with in-tree MPFR on at least x86_64-linux/darwin.
>> thanks
>> Iain
>> during GIMPLE pass: threadfull
>> ../../../src/mpfr/src/sin_cos.c: In function ‘mpfr_sin_cos’:
>> ../../../src/mpfr/src/sin_cos.c:29:1: internal compiler error: in type, at 
>> value-range.h:225
>>29 | mpfr_sin_cos (mpfr_ptr y, mpfr_ptr z, mpfr_srcptr x, mpfr_rnd_t 
>> rnd_mode)
>>   | ^~~~
>> 0x107d316 irange::type() const
>> ../../src/gcc/value-range.h:225

> Seems to have been fixed in r13-449.

yes, indeed (thanks for the fix Andrew).

> Compare:
> 
> https://gcc.gnu.org/pipermail/gcc-testresults/2022-May/761443.html
> 
> with (r13-448):

Which, by the law of maximum cussedness, was exactly the revision I pulled for 
weekly test runs :/

sorry for the noise,
Iain




Re: [COMMITTED] Export global ranges during the VRP block walk.

2022-05-14 Thread Toon Moene

On 5/14/22 10:00, Iain Sandoe via Gcc-patches wrote:


Hi Andrew


On 13 May 2022, at 14:58, Andrew MacLeod via Gcc-patches 
 wrote:

VRP currently searches the ssa_name list for globals to exported after it  
finishes running.  This change simply exports globals as they are calculated 
for the final time during the DOM walk.

This avoid the occasional awkwardness of determined what ssa-names in the list 
are important, as well as allowing forthcoming side-effect code to adjust what 
is currently known as a global value during the walk without affecting the 
values exported for the entire function.

Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed.


This (r13-436-gaf34279921f4) appears to cause or expose a problem which breaks 
bootstrap with in-tree MPFR on at least x86_64-linux/darwin.

thanks
Iain

during GIMPLE pass: threadfull
../../../src/mpfr/src/sin_cos.c: In function ‘mpfr_sin_cos’:
../../../src/mpfr/src/sin_cos.c:29:1: internal compiler error: in type, at 
value-range.h:225
29 | mpfr_sin_cos (mpfr_ptr y, mpfr_ptr z, mpfr_srcptr x, mpfr_rnd_t 
rnd_mode)
   | ^~~~
0x107d316 irange::type() const
 ../../src/gcc/value-range.h:225



Seems to have been fixed in r13-449.

Compare:

https://gcc.gnu.org/pipermail/gcc-testresults/2022-May/761443.html

with (r13-448):

https://gcc.gnu.org/pipermail/gcc-testresults/2022-May/761431.html

Kind regards,

--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands


Re: [COMMITTED] Export global ranges during the VRP block walk.

2022-05-14 Thread Iain Sandoe via Gcc-patches
Hi Andrew

> On 13 May 2022, at 14:58, Andrew MacLeod via Gcc-patches 
>  wrote:
> 
> VRP currently searches the ssa_name list for globals to exported after it  
> finishes running.  This change simply exports globals as they are calculated 
> for the final time during the DOM walk.
> 
> This avoid the occasional awkwardness of determined what ssa-names in the 
> list are important, as well as allowing forthcoming side-effect code to 
> adjust what is currently known as a global value during the walk without 
> affecting the values exported for the entire function.
> 
> Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed.

This (r13-436-gaf34279921f4) appears to cause or expose a problem which breaks 
bootstrap with in-tree MPFR on at least x86_64-linux/darwin.

thanks
Iain

during GIMPLE pass: threadfull
../../../src/mpfr/src/sin_cos.c: In function ‘mpfr_sin_cos’:
../../../src/mpfr/src/sin_cos.c:29:1: internal compiler error: in type, at 
value-range.h:225
   29 | mpfr_sin_cos (mpfr_ptr y, mpfr_ptr z, mpfr_srcptr x, mpfr_rnd_t 
rnd_mode)
  | ^~~~
0x107d316 irange::type() const
../../src/gcc/value-range.h:225
0x2a0052d operator_minus::lhs_op1_relation(irange const&, irange const&, irange 
const&, relation_kind_t) const
../../src/gcc/range-op.cc:1349
0x28a4a6a fold_using_range::range_of_range_op(irange&, gimple*, fur_source&)
../../src/gcc/gimple-range-fold.cc:643
0x28a43e4 fold_using_range::fold_stmt(irange&, gimple*, fur_source&, tree_node*)
../../src/gcc/gimple-range-fold.cc:555
0x28a380f fold_range(irange&, gimple*, edge_def*, range_query*)
../../src/gcc/gimple-range-fold.cc:326
0x28accb3 gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*, 
range_query&)
../../src/gcc/gimple-range-gori.cc:1298
0x289e775 ranger_cache::range_from_dom(irange&, tree_node*, basic_block_def*, 
ranger_cache::rfd_mode)
../../src/gcc/gimple-range-cache.cc:1511
0x289dc50 ranger_cache::fill_block_cache(tree_node*, basic_block_def*, 
basic_block_def*)
../../src/gcc/gimple-range-cache.cc:1311
0x289d2a6 ranger_cache::block_range(irange&, basic_block_def*, tree_node*, bool)
../../src/gcc/gimple-range-cache.cc:1139
0x289830a gimple_ranger::range_on_entry(irange&, basic_block_def*, tree_node*)
../../src/gcc/gimple-range.cc:154
0x289817e gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
../../src/gcc/gimple-range.cc:128
0x165d10f path_range_query::range_on_path_entry(irange&, tree_node*)
../../src/gcc/gimple-range-path.cc:162
0x165d327 path_range_query::internal_range_of_expr(irange&, tree_node*, gimple*)
../../src/gcc/gimple-range-path.cc:203
0x165d435 path_range_query::range_of_expr(irange&, tree_node*, gimple*)
../../src/gcc/gimple-range-path.cc:225
0x28a30b9 fur_stmt::get_operand(irange&, tree_node*)
../../src/gcc/gimple-range-fold.cc:157
0x28abca9 gori_compute::compute_operand1_range(irange&, gimple*, irange const&, 
tree_node*, fur_source&)
../../src/gcc/gimple-range-gori.cc:1023
0x28ab121 gori_compute::compute_operand_range(irange&, gimple*, irange const&, 
tree_node*, fur_source&)
../../src/gcc/gimple-range-gori.cc:760
0x28ac05d gori_compute::compute_operand1_range(irange&, gimple*, irange const&, 
tree_node*, fur_source&)
../../src/gcc/gimple-range-gori.cc:1077
0x28ab121 gori_compute::compute_operand_range(irange&, gimple*, irange const&, 
tree_node*, fur_source&)
../../src/gcc/gimple-range-gori.cc:760
0x28aca70 gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*, 
range_query&)
../../src/gcc/gimple-range-gori.cc:1271