diff --git a/llvm/lib/Analysis/TapirRaceDetect.cpp b/llvm/lib/Analysis/TapirRaceDetect.cpp index 6801b108ff8960..ac723e8572bb3b 100644 --- a/llvm/lib/Analysis/TapirRaceDetect.cpp +++ b/llvm/lib/Analysis/TapirRaceDetect.cpp @@ -184,9 +184,6 @@ class StratABIList { /// Returns whether this type is listed in the given category. bool isIn(const Type &Ty, StringRef Category = StringRef()) const { const Type *ElTy = &Ty; - // Strip any levels of pointer type. - while (const PointerType *PtrTy = dyn_cast(ElTy)) - ElTy = PtrTy->getElementType(); // We only handle struct types right now. if (const StructType *STy = dyn_cast(ElTy)) if (STy->hasName()) diff --git a/llvm/lib/Transforms/Tapir/OpenMPABI.cpp b/llvm/lib/Transforms/Tapir/OpenMPABI.cpp index c0e075b61bb966..4dc1dd5bb38355 100644 --- a/llvm/lib/Transforms/Tapir/OpenMPABI.cpp +++ b/llvm/lib/Transforms/Tapir/OpenMPABI.cpp @@ -477,7 +477,8 @@ Function* formatFunctionToTask(Function* extracted, Instruction* CallSite) { // Load the context struct so that we can access the task's accessed data auto *Context = IRBuilder.CreatePointerBitCastOrAddrSpaceCast( - IRBuilder.CreateConstGEP2_32(cast(out_args[1]->getType()->getScalarType())->getElementType(), out_args[1], 0, 1), SharedsPtrTy);//.back(); + // IRBuilder.CreateConstGEP2_32(cast(out_args[1]->getType()->getScalarType())->getElementType(), out_args[1], 0, 1), SharedsPtrTy);//.back(); + IRBuilder.CreateConstGEP2_32(KmpTaskTWithPrivatesTy, out_args[1], 0, 1), SharedsPtrTy); std::vector ForkedFnArgs;