[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-24 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #18 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:6180f5c8d6d1dc7b6634c41a46f0f8f5ca2e5b9d commit r12-5499-g6180f5c8d6d1dc7b6634c41a46f0f8f5ca2e5b9d Author: Richard Biener Date:

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #17 from Jan Hubicka --- Created attachment 51853 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51853=edit Updated patch Patch attached. Indeed the oracle ICEs on ref=base=NULL. I also checked that during cc1plus build we

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #16 from Richard Biener --- (In reply to Jan Hubicka from comment #13) > Concerning comment #10, the problem was that the loop walking all accesses > was missing loads->every_base check. This is used to represent that we > track no

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #15 from hubicka at kam dot mff.cuni.cz --- The patch passed testing on x86_64-linux.

Re: [Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread Jan Hubicka via Gcc-bugs
The patch passed testing on x86_64-linux.

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #14 from hubicka at kam dot mff.cuni.cz --- This is bit modified patch I am testing. I added pre-computation of the number of accesses, enabled the path for const functions (in case they have memory operand), initialized alias sets

Re: [Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread Jan Hubicka via Gcc-bugs
This is bit modified patch I am testing. I added pre-computation of the number of accesses, enabled the path for const functions (in case they have memory operand), initialized alias sets and clarified the logic around every_* and global_memory_accesses PR tree-optimization/103168

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #13 from Jan Hubicka --- Concerning comment #10, the problem was that the loop walking all accesses was missing loads->every_base check. This is used to represent that we track no useful info about loads performed at all. Anyway

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #12 from hubicka at kam dot mff.cuni.cz --- > unsigned p; > unsigned __attribute__((noinline)) test (void) > { > return p; > } > > modref analyzing 'test' (ipa=0) (pure) > - Analyzing load: p >- Recording base_set=0 ref_set=0

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #11 from Richard Biener --- And interestingly for unsigned p; unsigned __attribute__((noinline)) test (void) { return p; } I do not get any modref summary!? ;; Function test (test, funcdef_no=0, decl_uid=1979, cgraph_uid=1,

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #10 from Richard Biener --- Created attachment 51847 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51847=edit patch Looks like I have to exclude summary->global_memory_read since otherwise a trivial testcase like the

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #9 from hubicka at kam dot mff.cuni.cz --- > so indeed that's an issue. So it's a bug fixed, not an optimization > regression. I know, but the bug was fixed in unnecesarily generous way preventing a lot of valid tranforms

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-18 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #6 from hubicka at kam dot mff.cuni.cz --- > bool unknown_memory_access = false; > if (summary = get_modref_function_summary (stmt, NULL)) > { > /* First search if we can do someting useful. > Like for dse it

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-18 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #5 from hubicka at kam dot mff.cuni.cz --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 > > --- Comment #4 from Richard Biener --- > (In reply to Jan Hubicka from comment #3) > > This is simple (and fairly common) case we

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #4 from Richard Biener --- (In reply to Jan Hubicka from comment #3) > This is simple (and fairly common) case we don't optimize > struct a { > int a; > static __attribute__ ((noinline)) > int ret (int v)

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-17 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 --- Comment #3 from Jan Hubicka --- This is simple (and fairly common) case we don't optimize struct a { int a; static __attribute__ ((noinline)) int ret (int v) {return v;} __attribute__ ((noinline))

[Bug tree-optimization/103168] Value numbering for PRE of pure functions can be improved

2021-11-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168 Richard Biener changed: What|Removed |Added Last reconfirmed||2021-11-11 Summary|Value