[Polly] Remove some bitcasts (NFC)
No longer relevant with opaque pointers.
This commit is contained in:
parent
cd47f5bb59
commit
18680a36aa
|
@ -271,13 +271,6 @@ IslExprBuilder::createAccessAddress(__isl_take isl_ast_expr *Expr) {
|
|||
assert(Base->getType()->isPointerTy() && "Access base should be a pointer");
|
||||
StringRef BaseName = Base->getName();
|
||||
|
||||
auto PointerTy = PointerType::get(SAI->getElementType(),
|
||||
Base->getType()->getPointerAddressSpace());
|
||||
if (Base->getType() != PointerTy) {
|
||||
Base =
|
||||
Builder.CreateBitCast(Base, PointerTy, "polly.access.cast." + BaseName);
|
||||
}
|
||||
|
||||
if (isl_ast_expr_get_op_n_arg(Expr) == 1) {
|
||||
isl_ast_expr_free(Expr);
|
||||
if (PollyDebugPrinting)
|
||||
|
|
|
@ -186,15 +186,12 @@ Value *ParallelLoopGenerator::createParallelLoop(
|
|||
*LoopBody = Builder.GetInsertPoint();
|
||||
Builder.SetInsertPoint(&*BeforeLoop);
|
||||
|
||||
Value *SubFnParam = Builder.CreateBitCast(Struct, Builder.getInt8PtrTy(),
|
||||
"polly.par.userContext");
|
||||
|
||||
// Add one as the upper bound provided by OpenMP is a < comparison
|
||||
// whereas the codegenForSequential function creates a <= comparison.
|
||||
UB = Builder.CreateAdd(UB, ConstantInt::get(LongType, 1));
|
||||
|
||||
// Execute the prepared subfunction in parallel.
|
||||
deployParallelExecution(SubFn, SubFnParam, LB, UB, Stride);
|
||||
deployParallelExecution(SubFn, Struct, LB, UB, Stride);
|
||||
|
||||
return IV;
|
||||
}
|
||||
|
|
|
@ -128,8 +128,7 @@ ParallelLoopGeneratorGOMP::createSubFn(Value *Stride, AllocaInst *StructData,
|
|||
Builder.SetInsertPoint(HeaderBB);
|
||||
Value *LBPtr = Builder.CreateAlloca(LongType, nullptr, "polly.par.LBPtr");
|
||||
Value *UBPtr = Builder.CreateAlloca(LongType, nullptr, "polly.par.UBPtr");
|
||||
Value *UserContext = Builder.CreateBitCast(
|
||||
&*SubFn->arg_begin(), StructData->getType(), "polly.par.userContext");
|
||||
Value *UserContext = &*SubFn->arg_begin();
|
||||
|
||||
extractValuesFromStruct(Data, StructData->getAllocatedType(), UserContext,
|
||||
Map);
|
||||
|
|
|
@ -175,11 +175,7 @@ ParallelLoopGeneratorKMP::createSubFn(Value *SequentialLoopStride,
|
|||
std::advance(AI, 1);
|
||||
Value *Shared = &*AI;
|
||||
|
||||
Value *UserContext = Builder.CreateBitCast(Shared, StructData->getType(),
|
||||
"polly.par.userContext");
|
||||
|
||||
extractValuesFromStruct(Data, StructData->getAllocatedType(), UserContext,
|
||||
Map);
|
||||
extractValuesFromStruct(Data, StructData->getAllocatedType(), Shared, Map);
|
||||
|
||||
const auto Alignment = llvm::Align(is64BitArch() ? 8 : 4);
|
||||
Value *ID = Builder.CreateAlignedLoad(Builder.getInt32Ty(), IDPtr, Alignment,
|
||||
|
|
Loading…
Reference in New Issue
Block a user