This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget] Remove duplicate RTLRequiresFlags per device
ClosedPublic

Authored by Hahnfeld on Aug 9 2019, 10:53 AM.

Details

Summary

We have one global RTLs.RequiresFlags, I don't see a need to make a
copy per device that the runtime manages. This was problematic anyway
because the copy happened during the first __tgt_register_lib(). This
made it impossible to call __tgt_register_requires() from normal
functions for testing.
Hence, this change also fixes unified_shared_memory/shared_update.c for
older versions of Clang that don't call __tgt_register_requires() before
__tgt_register_lib().

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld created this revision.Aug 9 2019, 10:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2019, 10:53 AM
Hahnfeld edited the summary of this revision. (Show Details)Aug 9 2019, 10:53 AM

I see what you mean! I was working on a patch for adding a new method for manually setting the flag but this works too if we don't have to have a per device flag.

gtbercea accepted this revision.Aug 9 2019, 11:32 AM
This revision is now accepted and ready to land.Aug 9 2019, 11:32 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2019, 12:20 PM