This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][NFC] Move the `noinline` to the parallel entry point
ClosedPublic

Authored by jdoerfert on Mar 29 2021, 7:37 AM.

Details

Summary

The noinline for non-SPMD parallel functions is probably not necessary
but as long as we use it we should put it on the outermost parallel
function, which is the wrapper, not the actual outlined function.

Resolves PR49752

Diff Detail

Event Timeline

jdoerfert created this revision.Mar 29 2021, 7:37 AM
jdoerfert requested review of this revision.Mar 29 2021, 7:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2021, 7:37 AM
JonChesterfield accepted this revision.Mar 29 2021, 8:09 AM

Context in https://bugs.llvm.org/show_bug.cgi?id=49752 is that this resolves a regression in stack usage from D94315. This change looks good. I'm not totally sold on using a function call boundary to convey invariants on ICV, but that's an existing property.

This revision is now accepted and ready to land.Mar 29 2021, 8:09 AM
fhahn added a comment.Mar 29 2021, 8:23 AM

Is it possible to add a test?

Is it possible to add a test?

There is a test for the presence of noinline, let me make it more explicit.

jdoerfert updated this revision to Diff 333895.Mar 29 2021, 9:10 AM

Add test for nvptx codegen, including wrapper attribute check