geenrate gep IR

This commit is contained in:
2025-10-26 02:12:33 +05:30
parent 1ea44dd8e1
commit 93285dbdd8
6 changed files with 93 additions and 36 deletions

View File

@ -157,7 +157,8 @@ def compile_to_ir(filename: str, output: str, loglevel=logging.INFO):
module.add_named_metadata("llvm.ident", [f"PythonBPF {VERSION}"])
module_string = finalize_module(str(module))
module_string: str = finalize_module(str(module))
module_string += '\ndeclare ptr @llvm.preserve.struct.access.index.p0.p0(ptr, i32 immarg, i32 immarg) "nocallback" "nofree" "nosync" "nounwind" "willreturn" "memory(none)"'
logger.info(f"IR written to {output}")
with open(output, "w") as f: