[polly][opaque pointers] Remove use of deprecated APIs.
authorEli Friedman <efriedma@quicinc.com>
Fri, 3 Apr 2020 21:57:12 +0000 (14:57 -0700)
committerEli Friedman <efriedma@quicinc.com>
Sat, 4 Apr 2020 01:00:33 +0000 (18:00 -0700)
(See also D76269.)

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

index b29b1dd..09a0424 100644 (file)
@@ -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.
index 083be75..b3ff982 100644 (file)
@@ -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;
index d9a6916..470df60 100644 (file)
@@ -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;
index 9c93af9..66ebd4d 100644 (file)
@@ -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) {
index db753b1..a359a02 100644 (file)
@@ -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) {
index c742fa5..88ef395 100644 (file)
@@ -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(),