diff --git a/polly/include/polly/CodeGen/LoopGenerators.h b/polly/include/polly/CodeGen/LoopGenerators.h index b29b1dd06344..09a0424525c9 100644 --- a/polly/include/polly/CodeGen/LoopGenerators.h +++ b/polly/include/polly/CodeGen/LoopGenerators.h @@ -188,7 +188,7 @@ public: /// @param LB The lower bound for the loop we parallelize. /// @param UB The upper bound for the loop we parallelize. /// @param Stride The stride of the loop we parallelize. - virtual void deployParallelExecution(Value *SubFn, Value *SubFnParam, + virtual void deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride) = 0; /// Prepare the definition of the parallel subfunction. diff --git a/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h b/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h index 083be75ab2fd..b3ff9825ff3b 100644 --- a/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h +++ b/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h @@ -45,7 +45,7 @@ public: void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride); - void deployParallelExecution(Value *SubFn, Value *SubFnParam, Value *LB, + void deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride) override; virtual Function *prepareSubFnDefinition(Function *F) const override; diff --git a/polly/include/polly/CodeGen/LoopGeneratorsKMP.h b/polly/include/polly/CodeGen/LoopGeneratorsKMP.h index d9a6916f1cd2..470df6002bee 100644 --- a/polly/include/polly/CodeGen/LoopGeneratorsKMP.h +++ b/polly/include/polly/CodeGen/LoopGeneratorsKMP.h @@ -69,7 +69,7 @@ public: void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride); - void deployParallelExecution(Value *SubFn, Value *SubFnParam, Value *LB, + void deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride) override; virtual Function *prepareSubFnDefinition(Function *F) const override; diff --git a/polly/lib/CodeGen/LoopGeneratorsGOMP.cpp b/polly/lib/CodeGen/LoopGeneratorsGOMP.cpp index 9c93af924ac7..66ebd4dee831 100644 --- a/polly/lib/CodeGen/LoopGeneratorsGOMP.cpp +++ b/polly/lib/CodeGen/LoopGeneratorsGOMP.cpp @@ -47,7 +47,7 @@ void ParallelLoopGeneratorGOMP::createCallSpawnThreads(Value *SubFn, Builder.CreateCall(F, Args); } -void ParallelLoopGeneratorGOMP::deployParallelExecution(Value *SubFn, +void ParallelLoopGeneratorGOMP::deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride) { diff --git a/polly/lib/CodeGen/LoopGeneratorsKMP.cpp b/polly/lib/CodeGen/LoopGeneratorsKMP.cpp index db753b1f4606..a359a026a50e 100644 --- a/polly/lib/CodeGen/LoopGeneratorsKMP.cpp +++ b/polly/lib/CodeGen/LoopGeneratorsKMP.cpp @@ -59,7 +59,7 @@ void ParallelLoopGeneratorKMP::createCallSpawnThreads(Value *SubFn, Builder.CreateCall(F, Args); } -void ParallelLoopGeneratorKMP::deployParallelExecution(Value *SubFn, +void ParallelLoopGeneratorKMP::deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride) { diff --git a/polly/lib/Transform/RewriteByReferenceParameters.cpp b/polly/lib/Transform/RewriteByReferenceParameters.cpp index c742fa53e360..88ef395379f7 100644 --- a/polly/lib/Transform/RewriteByReferenceParameters.cpp +++ b/polly/lib/Transform/RewriteByReferenceParameters.cpp @@ -66,11 +66,11 @@ public: std::string InstName = Alloca->getName().str(); auto NewAlloca = - new AllocaInst(Alloca->getType()->getElementType(), 0, + new AllocaInst(Alloca->getAllocatedType(), 0, "polly_byref_alloca_" + InstName, &*Entry->begin()); - auto *LoadedVal = - new LoadInst(Alloca, "polly_byref_load_" + InstName, &Inst); + auto *LoadedVal = new LoadInst(Alloca->getAllocatedType(), Alloca, + "polly_byref_load_" + InstName, &Inst); new StoreInst(LoadedVal, NewAlloca, &Inst); auto *NewBitCast = new BitCastInst(NewAlloca, BitCast->getType(),