nvptx: Add '__builtin_stack_address()' test case (was: Causes to nvptx bootstrap fail: [PATCH v5] Introduce strub: machine-independent stack scrubbing)

2025-01-10 Thread Thomas Schwinge
Hi! On 2023-12-06T19:12:25-0300, Alexandre Oliva wrote: > On Dec 6, 2023, Thomas Schwinge wrote: >> As I understand things, ["strub"] cannot be implemented (at the call site) >> for >> nvptx, given that the callee's stack is not visible there: PTX is unusual >> in that the concept of a "standa

Re: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-07 Thread Alexandre Oliva
On Dec 6, 2023, Jan Hubicka wrote: > There is also access attribute which speaks directly about individual > arugments, perhaps you want to drop this one too? Ah, I've looked a little into it, and now I have a vague recollection of why I don't mess with them: they only apply to arguments of poi

Re: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-07 Thread Alexandre Oliva
On Dec 6, 2023, Jan Hubicka wrote: > I am sorry for sending this late. No need to be sorry. Thank you very much for taking the time to review and comment on it. > I think the ipa changes are generally fine. Phew :-) >> +static inline bool >> +strub_always_inline_p (cgraph_node *node) >> +{

Re: Causes to nvptx bootstrap fail: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-06 Thread Richard Biener
On Wed, Dec 6, 2023 at 11:12 PM Alexandre Oliva wrote: > > On Dec 6, 2023, Thomas Schwinge wrote: > > > As I understand things, this cannot be implemented (at the call site) for > > nvptx, given that the callee's stack is not visible there: PTX is unusual > > in that the concept of a "standard"

Re: Causes to nvptx bootstrap fail: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-06 Thread Alexandre Oliva
On Dec 6, 2023, Thomas Schwinge wrote: > As I understand things, this cannot be implemented (at the call site) for > nvptx, given that the callee's stack is not visible there: PTX is unusual > in that the concept of a "standard" stack isn't exposed. Not even when one PTX function calls another?

Re: Causes to nvptx bootstrap fail: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-06 Thread Thomas Schwinge
Hi Alexandre! On 2023-12-06T09:36:33+0100, Tobias Burnus wrote: > FYI the newly added file libgcc/strub.c of this patch (aka commit > r14-6201-gf0a90c7d7333fc ) > causes that nvptx does not bootstrap, failing with: ('s%bootstrap%build'.) > ./gcc/as -v -o strub.o strub.s > Verifying sm_30 code

Re: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-06 Thread Jan Hubicka
Hi, I am sorry for sending this late. I think the ipa changes are generally fine. There are few things which was not clear to me. > for gcc/ChangeLog > > * Makefile.in (OBJS): Add ipa-strub.o. > (GTFILES): Add ipa-strub.cc. > * builtins.def (BUILT_IN_STACK_ADDRESS): New. >

Causes to nvptx bootstrap fail: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-06 Thread Tobias Burnus
Hi, CC'd Thomas. FYI the newly added file libgcc/strub.c of this patch (aka commit r14-6201-gf0a90c7d7333fc ) causes that nvptx does not bootstrap, failing with: ./gcc/as -v -o strub.o strub.s Verifying sm_30 code with sm_50 code generation. ptxas -c -o /dev/null strub.o --gpu-name sm_50 -O0

Re: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-05 Thread Alexandre Oliva
On Dec 5, 2023, Alexandre Oliva wrote: > I intend to install this as part of the monster patch upthread. I tweaked it a little further, so that exceptions don't mess with the pattern counts, and extending the same anti-vrp measure to the other strub-const tests, even though they weren't affecte

Re: [PATCH v5] Introduce strub: machine-independent stack scrubbing

2023-12-04 Thread Alexandre Oliva
The recently-installed patch for interprocedural value-range propagation enabled some folding that was not expected by the strub-const testcases, causing them to fail. I'm making the following adjustments to them to restore the behavior they tested for, and to make them more future-proof to future