Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Tracked by #82224
kotlarmilos opened this issue Mar 14, 2023 · 1 comment
Closed
Tracked by #82224
Assignees
Milestone

Comments

@kotlarmilos
Copy link
Member

kotlarmilos commented Mar 14, 2023

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
}
@kotlarmilos
Copy link
Member Author

Discussion #83377 (comment)

@ghost ghost locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant