Skip to content

Commit

Permalink
[Tapir] Remove some uses of getElementType.
Browse files Browse the repository at this point in the history
  • Loading branch information
neboat authored and tarunprabhu committed Oct 12, 2023
1 parent 408aa22 commit 8cc6a33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions llvm/lib/Analysis/TapirRaceDetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PointerType>(ElTy))
ElTy = PtrTy->getElementType();
// We only handle struct types right now.
if (const StructType *STy = dyn_cast<StructType>(ElTy))
if (STy->hasName())
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Transforms/Tapir/OpenMPABI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PointerType>(out_args[1]->getType()->getScalarType())->getElementType(), out_args[1], 0, 1), SharedsPtrTy);//.back();
// IRBuilder.CreateConstGEP2_32(cast<PointerType>(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<Value *> ForkedFnArgs;

Expand Down

0 comments on commit 8cc6a33

Please sign in to comment.