From: Eli Friedman Date: Fri, 3 Apr 2020 21:57:12 +0000 (-0700) Subject: [polly][opaque pointers] Remove use of deprecated APIs. X-Git-Tag: llvmorg-12-init~10117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e5d671c1910a0477e352eb858654ad5e45f4757;p=platform%2Fupstream%2Fllvm.git [polly][opaque pointers] Remove use of deprecated APIs. (See also D76269.) --- diff --git a/polly/include/polly/CodeGen/LoopGenerators.h b/polly/include/polly/CodeGen/LoopGenerators.h index b29b1dd..09a0424 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 083be75..b3ff982 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 d9a6916..470df60 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 9c93af9..66ebd4d 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 db753b1..a359a02 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 c742fa5..88ef395 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(),