File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,7 @@ def update_max_temps_for_stmt(stmt):
425425 max_temps_needed = max (max_temps_needed , temps_needed )
426426
427427 for stmt in body :
428+ update_max_temps_for_stmt (stmt )
428429 has_metadata = False
429430 if isinstance (stmt , ast .If ):
430431 if stmt .body :
@@ -545,6 +546,13 @@ def update_max_temps_for_stmt(stmt):
545546
546547 if double_alloc :
547548 local_sym_tab [f"{ var_name } _tmp" ] = LocalSymbol (var_tmp , tmp_ir_type )
549+
550+ logger .info (f"Temporary scratch space needed for calls: { max_temps_needed } " )
551+ for i in range (max_temps_needed ):
552+ temp_var = builder .alloca (ir .IntType (64 ), name = f"__helper_temp_{ i } " )
553+ temp_var .align = 8
554+ local_sym_tab [f"__helper_temp_{ i } " ] = LocalSymbol (temp_var , ir .IntType (64 ))
555+
548556 return local_sym_tab
549557
550558
You can’t perform that action at this time.
0 commit comments