Skip to content

Commit 9d9562a

Browse files
committed
Address reviewer comment
1 parent 46388c1 commit 9d9562a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,15 +2172,14 @@ static llvm::omp::OpenMPOffloadMappingFlags mapParentWithMembers(
21722172
// opaque pointers we lose the ability to easily check if something is
21732173
// a pointer whilst maintaining access to the underlying type.
21742174
static bool checkIfPointerMap(mlir::omp::MapInfoOp mapOp) {
2175+
// If we have a varPtrPtr field assigned then the underlying type is a pointer
2176+
if (mapOp.getVarPtrPtr())
2177+
return true;
2178+
21752179
// If the map data is declare target with a link clause, then it's represented
21762180
// as a pointer when we lower it to LLVM-IR even if at the MLIR level it has
21772181
// no relation to pointers.
2178-
if (isDeclareTargetLink(mapOp.getVarPtrPtr() ? mapOp.getVarPtrPtr()
2179-
: mapOp.getVarPtr()))
2180-
return true;
2181-
2182-
// If we have a varPtrPtr field assigned then the underlying type is a pointer
2183-
if (mapOp.getVarPtrPtr())
2182+
if (isDeclareTargetLink(mapOp.getVarPtr()))
21842183
return true;
21852184

21862185
return false;

0 commit comments

Comments
 (0)