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

[Bug tree-optimization/68673] Handle __builtin_GOMP_task optimally in ipa-pta


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.

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