mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
generate IR partly
This commit is contained in:
@ -245,13 +245,17 @@ def _allocate_for_attribute(builder, var_name, rval, local_sym_tab, structs_sym_
|
||||
|
||||
# loaded_value = builder.load(field_ir, align=8)
|
||||
# #TODO: fatal flaw that this always assumes first argument of function to be the context of what this gets.
|
||||
# base_ptr = builder.function.args[0]
|
||||
base_ptr = builder.function.args[0]
|
||||
local_sym_tab[
|
||||
struct_var
|
||||
].var = base_ptr # This is repurposing of var to store the pointer of the base type
|
||||
local_sym_tab[struct_var].ir_type = field_ir
|
||||
# gep_result = builder.gep(
|
||||
# base_ptr,
|
||||
# [loaded_value],
|
||||
# inbounds=False, # Not using inbounds GEP
|
||||
# )
|
||||
# print("DEBB", loaded_value, base_ptr, gep_result)
|
||||
# print("DEBUG", loaded_value, base_ptr, gep_result)
|
||||
# Use i64 for allocation since that's what the global variable contains
|
||||
|
||||
actual_ir_type = ir.IntType(64)
|
||||
|
||||
Reference in New Issue
Block a user