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] |
On Sun, 7 Jan 2007, Richard Guenther wrote:
> Bootstrapped and tested on x86_64-unknown-linux-gnu. > > Applied to mainline. > Richard. > > 2007-01-07 Richard Guenther <rguenther@suse.de> > > * tree-vrp.c (extract_range_from_assert): CSE calls to > compare_values where possible. > (extract_range_from_unary_expr): Likewise.
Wouldn't it be more natural to apply atttribute const or pure to compare_values() and let the optimizer to this for you (everywhere)?
Well, we'd lie to the compiler as compare_values has side-effects. It shouldn't break anything but I remember we concluded not to like it. (We could also "safely" mark build_int_cst pure for example)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |