This is the mail archive of the 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]

Re: [patch] Make adjust_range_with_scev produce only simple bounds


> >some parts of tree-vrp (for example, compare_values function) assume
> >that the bounds of ranges are simple expressions -- constants or ssa
> >names,  possibly offsetted by a constant.  However,
> >adjust_range_with_scev uses values coming from  
> >analyze_scalar_evolution
> >as these bounds, which causes problems, since analyze_scalar_evolution
> >may return an arbitrary expression.  I do not have a testcase for
> >mainline, but this causes a bootstrap failure with a patch I am
> >currently working on.  This patch makes us ensure that the value
> >we are going to use as a bound is simple.
> Shouldn't instead we deal with more complex ranges?

as usual, most of the benefits of the optimization come from dealing
with the simple cases, so I guess it would not be really useful;
however, one cannot be sure unless he spends few days playing with
updating vrp to handle them.

> What is an example of range which you are running into which should
> help someone decide if that is really a complex range or not?

In my case, it was something like 42 - ssa_name; however,
analyze_scalar_evolution may return basically arbitrary expression.


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