This patch moves the createOffloadEntriesAndInfoMetadata to OpenMPIRBuilder,
the createOffloadEntry helper function. The clang specific error handling is
invoked using a callback. This code will also be used by flang in the future.
Details
Diff Detail
Event Timeline
I think the pure code move looks good. My comments below are more concerned with cleanup/clarification we could do while we are here.
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h | ||
---|---|---|
27 | It's a struct, according to the pre-commit buildbot error. | |
1101 | IsGPU is not great. If anything, let's call it "IsTargetCodegen" or similar. Also elsewhere. As this clashes with the special handling of "host offloading", I would suggest to then rename IsDevice to IsEmbedded or something. This should work for non-GPUs and also the "IsDevice" flag is misnamed as the host offloading is also targeting a device. | |
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | ||
4734 | Why do we call it in SIMD mode in the first place? |
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h | ||
---|---|---|
1101 |
Yes, I was a bit confused about the naming, so I opted to use the names that the clang options indicate. I will make the changes you suggested and hopefully that will be cleaner. |
It's a struct, according to the pre-commit buildbot error.