Loading clang/lib/CodeGen/CGKokkos.cpp +17 −15 Original line number Diff line number Diff line Loading @@ -446,7 +446,11 @@ bool CodeGenFunction::EmitKokkosParallelFor(const CallExpr *CE, return true; } // This is in charge of building an inner loop // This is in charge of building an inner loop. It works as a recursive function to allow the loops // to actually end up being nested // // This should be usuable by any function that requires inner loops // bool CodeGenFunction::EmitKokkosInnerLoop(const CallExpr *CE, const LambdaExpr *Lambda, llvm::BasicBlock *TopBlock, std::queue<const Expr*> DimQueue, Loading @@ -468,9 +472,8 @@ bool CodeGenFunction::EmitKokkosInnerLoop(const CallExpr *CE, const LambdaExpr * llvm::BasicBlock *LoopBody = createBasicBlock("kokkos.forall.body" + std::to_string(pos)); llvm::BasicBlock *Increment = createBasicBlock("kokkos.forall.inc" + std::to_string(pos)); JumpDest EndDest = getJumpDestInCurrentScope("kokkos.forall.endlbl" + std::to_string(pos)); llvm::BasicBlock *End = createBasicBlock("kokkos.forall.end" + std::to_string(pos)); // Zero out the induction variable // Set the induction variable's starting point EmitBlock(InductionSet); llvm::Value *LoopStart = EmitScalarExpr(SE); Builder.CreateStore(LoopStart, GetAddrOfLocalVar(InductionVarDecl)); Loading Loading @@ -508,7 +511,6 @@ bool CodeGenFunction::EmitKokkosInnerLoop(const CallExpr *CE, const LambdaExpr * } EmitBlock(EndDest.getBlock()); EmitBlock(End, true); return true; } Loading Loading
clang/lib/CodeGen/CGKokkos.cpp +17 −15 Original line number Diff line number Diff line Loading @@ -446,7 +446,11 @@ bool CodeGenFunction::EmitKokkosParallelFor(const CallExpr *CE, return true; } // This is in charge of building an inner loop // This is in charge of building an inner loop. It works as a recursive function to allow the loops // to actually end up being nested // // This should be usuable by any function that requires inner loops // bool CodeGenFunction::EmitKokkosInnerLoop(const CallExpr *CE, const LambdaExpr *Lambda, llvm::BasicBlock *TopBlock, std::queue<const Expr*> DimQueue, Loading @@ -468,9 +472,8 @@ bool CodeGenFunction::EmitKokkosInnerLoop(const CallExpr *CE, const LambdaExpr * llvm::BasicBlock *LoopBody = createBasicBlock("kokkos.forall.body" + std::to_string(pos)); llvm::BasicBlock *Increment = createBasicBlock("kokkos.forall.inc" + std::to_string(pos)); JumpDest EndDest = getJumpDestInCurrentScope("kokkos.forall.endlbl" + std::to_string(pos)); llvm::BasicBlock *End = createBasicBlock("kokkos.forall.end" + std::to_string(pos)); // Zero out the induction variable // Set the induction variable's starting point EmitBlock(InductionSet); llvm::Value *LoopStart = EmitScalarExpr(SE); Builder.CreateStore(LoopStart, GetAddrOfLocalVar(InductionVarDecl)); Loading Loading @@ -508,7 +511,6 @@ bool CodeGenFunction::EmitKokkosInnerLoop(const CallExpr *CE, const LambdaExpr * } EmitBlock(EndDest.getBlock()); EmitBlock(End, true); return true; } Loading