This patch moves the logic for generating the offloading entries to the
OpenMPIRBuilder. This makes it easier to re-use in other places, such as
for OpenMP support in Flang or using the same method for generating
offloading entires for other languages like Cuda.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
If we'd like it to be used by CUDA or other programming models, llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp is not a good place. Other than that, the patch looks good to me.
Comment Actions
I couldn't think of a better place to put this. Using it outside of OpenMP just requires initializing the OpenMP types so it's not a huge burden. I also want to change the names from omp_offloading so it's more generic but figured I wouldn't pollute the patch with those test changes.