We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 321415f commit 6bce29bCopy full SHA for 6bce29b
1 file changed
pythonbpf/functions/functions_pass.py
@@ -425,6 +425,7 @@ def update_max_temps_for_stmt(stmt):
425
max_temps_needed = max(max_temps_needed, temps_needed)
426
427
for stmt in body:
428
+ update_max_temps_for_stmt(stmt)
429
has_metadata = False
430
if isinstance(stmt, ast.If):
431
if stmt.body:
@@ -545,6 +546,13 @@ def update_max_temps_for_stmt(stmt):
545
546
547
if double_alloc:
548
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
556
return local_sym_tab
557
558
0 commit comments