Skip to content

[mono][aot] Propose initialization of nollvm methods without a PLT entry #83376

@kotlarmilos

Description

@kotlarmilos

Description

This issue tracks progress on proposal of nollvm methods initialization without a PLT entry. The idea is to use the same approach as for llvm methods. It requires mono_inited-like struct that indicates if a method is inited and invokes initialization in method prolog.

; Function Attrs: noinline uwtable
define hidden monocc void @HelloWorld_Program_Main_string__(i64* %arg_args) #2 gc "coreclr" !dbg !13 {
BB0:
  br label %INIT_BB1, !dbg !17

INIT_BB1:                                         ; preds = %BB0
  %is_inited = load i8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @mono_inited, i32 0, i32 0), align 1, !dbg !17
  %0 = call i8 @llvm.expect.i8(i8 %is_inited, i8 1), !dbg !17
  %1 = icmp eq i8 %0, 0, !dbg !17
  br i1 %1, label %NOTINITED_BB15, label %INITED_BB2, !dbg !17

...

NOTINITED_BB15:                                   ; preds = %INIT_BB1
  call void @mono_aot_HelloWorld_init_method(i64* bitcast ([11 x i8]* @info_HelloWorld_Program_Main_string__ to i64*)), !dbg !17
  store i8 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @mono_inited, i32 0, i32 0), align 1, !dbg !17
  br label %INITED_BB2, !dbg !17
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions