This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/68673] Handle __builtin_GOMP_task optimally in ipa-pta
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Dec 2015 11:09:44 +0000
- Subject: [Bug tree-optimization/68673] Handle __builtin_GOMP_task optimally in ipa-pta
- Auto-submitted: auto-generated
- References: <bug-68673-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68673
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Comment on attachment 36910
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36910
tentative patch, part 1, handles f1 and f2
What is the reason for testing for NULL depend?
I guess it depends on what the tree-ssa-structalias.c code is actually doing
with it. depend is either a NULL, or pointer to an array which contains
pointers and some sizes, but 1) those pointers/sizes never escape to the task
callback functions 2) they are never actually used as addresses, just as
cookies.
So, we need to ensure that if depend is non-NULL, then PTA/IPA-PTA/alias
oracle/whatever else does not try to optimize the argument away, or think it
isn't used, so from this POV the call acts as a readonly use of the array. But
other than that it acts as GOMP_task with NULL depend.