On Mon, Jun 16, 2025 at 08:14:53PM +0200, Josef Melcr wrote: > Certainly :) I am sorry about my lack of activity in the last two months, > I've been really busy, first with the thesis and now with studying for the > state finals. I will hopefully wrap up these academic duties this Thursday > and I will finally have the time to resume work on this patch. > > I will add the space then, drop the documentation, fix the formatting and > also track down the segfault Jakub discovered. I will try to get these > changes done as soon as possible.
All I wanted to make sure is that this is not stuck from my side. Graduation is more important than this ;) > Regarding Jakub's earlier response about GOMP_task, I will probably drop the > copyfn attribute for now and sort it out incrementally. You also mentioned > that GOMP_task should be special-cased and not use the attribute at all, > could you please help me understand the reasoning behind that? I am not > quite sure why the attribute shouldn't be used in this case. GOMP_task is a function with 2 callbacks rather than one, the simple case where it works as a function with just one callback is only when compile time NULL is passed to the second callback (then it can be handled as if it had the " callback" attribute for the first callback), otherwise it needs extra handling (tracking how values propagate through the second callback to the first callback). And then there is IFN_ASSUME which also isn't appropriate for the simple callback attribute. While IPA optimizations can't change number of arguments to the functions with " callback" attribute or the simple GOMP_task case, all they can do is propagate constants or value ranges etc. or possibly change the type on both the caller side and callback side if it is guaranteed nothing else sees the type, IFN_ASSUME can have any number of arguments and optimizations like IPA-SRA/IPA-CP etc. really should change the arguments passed to it in order to make use of the assumptions. IFN_ASSUME (&fn, arg1, arg2, arg3); is to be treated as if it was fn (arg1, arg2, arg3); call which is done only hopothetically; if the compiler sees all uses of a particular fn (the common case), it could change it to IFN_ASSUME (&fn, arg4, arg5); with some other types if it also changes fn's argument, similarly like it can change normal call (static or IPA cloned). Jakub