[polly] 3e5d671 - [polly][opaque pointers] Remove use of deprecated APIs.
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 18:01:38 PDT 2020
Author: Eli Friedman
Date: 2020-04-03T18:00:33-07:00
New Revision: 3e5d671c1910a0477e352eb858654ad5e45f4757
URL: https://github.com/llvm/llvm-project/commit/3e5d671c1910a0477e352eb858654ad5e45f4757
DIFF: https://github.com/llvm/llvm-project/commit/3e5d671c1910a0477e352eb858654ad5e45f4757.diff
LOG: [polly][opaque pointers] Remove use of deprecated APIs.
(See also D76269.)
Added:
Modified:
polly/include/polly/CodeGen/LoopGenerators.h
polly/include/polly/CodeGen/LoopGeneratorsGOMP.h
polly/include/polly/CodeGen/LoopGeneratorsKMP.h
polly/lib/CodeGen/LoopGeneratorsGOMP.cpp
polly/lib/CodeGen/LoopGeneratorsKMP.cpp
polly/lib/Transform/RewriteByReferenceParameters.cpp
Removed:
################################################################################
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 @@ class ParallelLoopGenerator {
/// @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 @@ class ParallelLoopGeneratorGOMP : public ParallelLoopGenerator {
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 @@ class ParallelLoopGeneratorKMP : public ParallelLoopGenerator {
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 @@ class RewriteByrefParams : public FunctionPass {
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(),
More information about the llvm-commits
mailing list