This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][OMPIRBuilder] Migrate target outlined function registration to OMPIRBuilder from clang
ClosedPublic

Authored by jsjodin on Nov 7 2022, 2:12 PM.

Details

Summary

This patch moves the outlined function registration, function attribute
configuration and function ID creation to the OpenMPIRBuilder. This will later
be used by flag as well.

Diff Detail

Event Timeline

jsjodin created this revision.Nov 7 2022, 2:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 7 2022, 2:12 PM
jsjodin requested review of this revision.Nov 7 2022, 2:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 7 2022, 2:12 PM
jdoerfert added inline comments.Nov 7 2022, 3:28 PM
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
1467

Outlined function is too generic for the function name here and elsewhere. It's an outlined target region, or similar. We outline a lot of functions but this is specific to target regions, correct?

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
3960

This is not DSO local? Maybe add a TODO to check this in the future.

3979–3984

no else after return

jsjodin updated this revision to Diff 473997.Nov 8 2022, 7:12 AM
jsjodin marked 2 inline comments as done.

Changed setOutlinedFunctionAttributes to setOutlinedTargetRegionFunctionAttributes. Fixed else after return. Added TODO. Removed comment.

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
1467

Outlined function is too generic for the function name here and elsewhere. It's an outlined target region, or similar. We outline a lot of functions but this is specific to target regions, correct?

Yes, I am replacing it with setOutlinedTargetRegionFunctionAttributes.

jsjodin marked an inline comment as done.Nov 16 2022, 5:55 AM
jsjodin updated this revision to Diff 477992.Nov 25 2022, 9:33 AM

Update against trunk.

jsjodin updated this revision to Diff 478000.Nov 25 2022, 10:28 AM

No need to pass in IsEmbedded, it is in the config now. Perhaps the manager should also have the config available.

This revision is now accepted and ready to land.Nov 28 2022, 10:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2022, 11:24 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript