[OpenMP] Emit calls to int64_t functions for amdgcn
Two functions, syncwarp and active_thread_mask, return lanemask_t. Currently
this is assumed to be int32, which is true for nvptx. Patch makes the type
target architecture dependent.
Paths
| Differential D89746
[OpenMP] Emit calls to int64_t functions for amdgcn ClosedPublic Authored by JonChesterfield on Oct 19 2020, 3:22 PM.
Details
Summary [OpenMP] Emit calls to int64_t functions for amdgcn Two functions, syncwarp and active_thread_mask, return lanemask_t. Currently
Diff Detail
Event Timeline
Comment Actions Generally yes. Some comments. Can you add the functions to the test that adds attributes. It should "pick up" the signature and add attributes only for the right one. We might need to add the functions to some attribute group in the OMPKinds.def but that would be good anyway, even if we just do nounwind.
Comment Actions Good call on shadowing, those are all gone. Attributes are more difficult as the test is IR, so can't declare the function twice. Haven't managed to tag nounwind onto either yet but will try a few more things. This revision is now accepted and ready to land.Oct 21 2020, 7:38 PM This revision was landed with ongoing or failed builds.Oct 22 2020, 7:03 AM Closed by commit rG09bc755deaa6: [OpenMP] Emit calls to int64_t functions for amdgcn (authored by JonChesterfield). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 299960 llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/test/Transforms/OpenMP/add_attributes.ll
llvm/test/Transforms/OpenMP/add_attributes_amdgcn.ll
|
I would suggest to put it in OMPKinds.def similar to size_t:
I guess you can keep getLanemaskType and use it though.