mun_codegen 0.3.0

LLVM IR code generation for Mun
---
source: crates/mun_codegen/src/test.rs
expression: "\n    pub fn fibonacci(n:i32) -> i32 {\n        let a = 0;\n        let b = 1;\n        let i = 1;\n        loop {\n            if i > n {\n                return a\n            }\n            let sum = a + b;\n            a = b;\n            b = sum;\n            i += 1;\n        }\n    }\n    "
---
; == FILE IR (mod) =====================================
; ModuleID = 'mod'
source_filename = "mod"

%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [3 x i8], %"mun_codegen::ir::types::TypeInfoData", [0 x i64] }>
%"mun_codegen::ir::types::TypeInfoData" = type <{ [0 x i8], i8, [39 x i8] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

define i32 @fibonacci(i32 %0) {
body:
  br label %loop

loop:                                             ; preds = %if_merge, %body
  %b.0 = phi i32 [ 1, %body ], [ %add, %if_merge ]
  %a.0 = phi i32 [ 0, %body ], [ %b.0, %if_merge ]
  %i.0 = phi i32 [ 1, %body ], [ %add11, %if_merge ]
  %greater = icmp sgt i32 %i.0, %0
  br i1 %greater, label %then, label %if_merge

then:                                             ; preds = %loop
  ret i32 %a.0

if_merge:                                         ; preds = %loop
  %add = add i32 %a.0, %b.0
  %add11 = add i32 %i.0, 1
  br label %loop
}

; == GROUP IR (mod) ====================================
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [3 x i8], %"mun_codegen::ir::types::TypeInfoData", [0 x i64] }>
%"mun_codegen::ir::types::TypeInfoData" = type <{ [0 x i8], i8, [39 x i8] }>

@"type_info::<core::i32>::name" = private unnamed_addr constant [10 x i8] c"core::i32\00"
@"type_info::<core::i32>" = private unnamed_addr constant <{ [16 x i8], i8*, [48 x i8] }> <{ [16 x i8] c"\17yzt\19\D62\17\D25\95C\17\88[\FA", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::i32>::name", i32 0, i32 0), [48 x i8] c" \00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::i32>"]