================
@@ -3623,6 +3623,9 @@ static llvm::omp::OpenMPOffloadMappingFlags 
mapParentWithMembers(
     LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder,
     llvm::OpenMPIRBuilder &ompBuilder, DataLayout &dl, MapInfosTy 
&combinedInfo,
     MapInfoData &mapData, uint64_t mapDataIndex, bool isTargetParams) {
+  assert(!ompBuilder.Config.isTargetDevice() &&
+         "function only supported for host device codegen");
----------------
bhandarkar-pranav wrote:

<nit> : The wording would be that much clearer if you didn't use the word 
device here at all. 
`"function only supported for host codegen"` or `"function only supported for 
host side codegen"`

I know that here you the two terms you are using that are opposite to each 
other in meaning are "host device" and "target device", but when an assert is 
hit only one of them will be seen. If it is "target device" that's fine because 
target, target device and device are sort of used interchangeably (in my 
experience so far). However, I have come across ample usage of just "device" to 
mean target only. So, host device can be confusing.

However, I do also recognize that "hostdevice" is used in other places, in at 
least the runtime. So, if "host device" is more prevalent, then ignore this 
comment entirely.

https://github.com/llvm/llvm-project/pull/137199
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to