This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add new OpenMP globalization functions to library info
ClosedPublic

Authored by jhuber6 on May 7 2021, 12:18 PM.

Details

Summary

The changes to globalization introduced in D97680 created two new functions to
push / pop shareably memory on the GPU, __kmpc_alloc_shared and
__kmpc_free_shared. This patch adds these new runtime functions to the
library info so they can be used by the HeapToStack attributor interface. This
optimization replaces malloc / free pairs with stack memory if legal.

Diff Detail

Event Timeline

jhuber6 created this revision.May 7 2021, 12:18 PM
jhuber6 requested review of this revision.May 7 2021, 12:18 PM
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
This revision is now accepted and ready to land.May 7 2021, 12:20 PM
jhuber6 updated this revision to Diff 344199.May 10 2021, 2:04 PM

Adding __kmpc_free_shared as a valid free built-in function so it works properly with AAHeapToStack.