This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Only register HeapToShared in the OpenMPOpt module pass
Needs ReviewPublic

Authored by jhuber6 on Jul 23 2021, 10:30 AM.

Details

Reviewers
jdoerfert
Summary

This patch moves registering HeapToShared to only occur in the module pass.
This does nothing if run outside of the module pass because it requires intact
call sites and all the analysis we can do has already been done.

Diff Detail

Event Timeline

jhuber6 created this revision.Jul 23 2021, 10:30 AM
jhuber6 requested review of this revision.Jul 23 2021, 10:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2021, 10:30 AM

We should instead keep noinline on them till the CGSCC pass, at least for this one as it could trigger late even if it wasn't possible early.

We should instead keep noinline on them till the CGSCC pass, at least for this one as it could trigger late even if it wasn't possible early.

But we run the Module pass and CGSCC passes at different optimization levels right now. It's possible that H2S could remove something after more optimizations, but I haven't seen any examples of something failing to be moved to the stack because of optimizations.

We should instead keep noinline on them till the CGSCC pass, at least for this one as it could trigger late even if it wasn't possible early.

But we run the Module pass and CGSCC passes at different optimization levels right now. It's possible that H2S could remove something after more optimizations, but I haven't seen any examples of something failing to be moved to the stack because of optimizations.

not inlining alloc_shared/free_shared is probably not a real concern, it's slow either way.

ormris removed a subscriber: ormris.Jan 24 2022, 11:50 AM