@@ -486,16 +486,15 @@ class LLVMCodegen {
486
486
halide_cg.get_builder ().CreateBr (headerBB);
487
487
488
488
llvm::PHINode* phi = nullptr ;
489
+ auto iterator = node.get_iterator ().get_id ();
489
490
490
491
// Loop Header
491
492
{
492
493
auto initVal = IslExprToSInt (node.get_init ());
493
494
halide_cg.get_builder ().SetInsertPoint (headerBB);
494
495
phi = halide_cg.get_builder ().CreatePHI (
495
- llvm::Type::getInt64Ty (llvmCtx),
496
- 2 ,
497
- node.get_iterator ().get_id ().get_name ());
498
- halide_cg.sym_push (node.get_iterator ().get_id ().get_name (), phi);
496
+ llvm::Type::getInt64Ty (llvmCtx), 2 , iterator.get_name ());
497
+ halide_cg.sym_push (iterator.get_name (), phi);
499
498
phi->addIncoming (getLLVMConstantSignedInt64 (initVal), incoming);
500
499
501
500
auto cond_expr = node.get_cond ();
@@ -507,7 +506,7 @@ class LLVMCodegen {
507
506
CHECK (
508
507
isl_ast_expr_get_type (condLHS.get ()) ==
509
508
isl_ast_expr_type::isl_ast_expr_id);
510
- CHECK_EQ (condLHS.get_id (), node. get_iterator (). get_id () );
509
+ CHECK_EQ (condLHS.get_id (), iterator );
511
510
512
511
IslAstExprInterpeter i (scop_.globalParameterContext );
513
512
auto condRHSVal = i.interpret (cond_expr.get_op_arg (1 ));
@@ -564,7 +563,7 @@ class LLVMCodegen {
564
563
}
565
564
566
565
halide_cg.get_builder ().SetInsertPoint (loopExitBB);
567
- halide_cg.sym_pop (node. get_iterator (). get_id () .get_name ());
566
+ halide_cg.sym_pop (iterator .get_name ());
568
567
#ifdef TAPIR_VERSION_MAJOR
569
568
if (parallel) {
570
569
auto * syncBB = llvm::BasicBlock::Create (llvmCtx, " synced" , function);
0 commit comments