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

Add "--enable-builtin-intrinsics=<...>" option to wamrc #2341

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

no1wudi
Copy link
Collaborator

@no1wudi no1wudi commented Jul 4, 2023

Refer to xip.md for detail

@no1wudi no1wudi force-pushed the intrinsic branch 2 times, most recently from 14e41a7 to 8ff7999 Compare July 4, 2023 08:06
doc/xip.md Outdated Show resolved Hide resolved
doc/xip.md Show resolved Hide resolved
@@ -68,6 +68,12 @@ print_help()
printf(" --xip A shorthand of --enalbe-indirect-mode --disable-llvm-intrinsics\n");
printf(" --enable-indirect-mode Enalbe call function through symbol table but not direct call\n");
printf(" --disable-llvm-intrinsics Disable the LLVM built-in intrinsics\n");
printf(" --enable-builtin-intrinsics=<i64.common,f64.common>\n");
printf(" Enable the specified built-in intrinsics, it will override the default settings.\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a little too long this line, can we put settings. to next line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

wamr-compiler/main.c Show resolved Hide resolved
}

/* Handle other single items */
for (uint32 i = 0; i < g_intrinsic_count; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had better declare uint32 i at the beginning of this function or the beginning of { ... }.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Comment on lines 73 to 74
printf(" settings.\n");
printf(" It only takes effect when --disable-llvm-intrinsics is set.\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I meant to merge the next two lines into one:

    printf("                            Enable the specified built-in intrinsics, it will override the default\n");
    printf("                            settings. It only takes effect when --disable-llvm-intrinsics is set.\n");

Do you think it is better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's merge them


/* Handle 'all' group */
if (strstr(comp_ctx->builtin_intrinsics, "all")) {
for (uint32 i = 0; i < g_intrinsic_count; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable shadows the previous one. Should remove uint32 here.

@@ -68,6 +68,12 @@ print_help()
printf(" --xip A shorthand of --enalbe-indirect-mode --disable-llvm-intrinsics\n");
printf(" --enable-indirect-mode Enalbe call function through symbol table but not direct call\n");
printf(" --disable-llvm-intrinsics Disable the LLVM built-in intrinsics\n");
printf(" --enable-builtin-intrinsics=<i64.common,f64.common>\n");
printf(" Enable the specified built-in intrinsics, it will override the default\n");
printf(" settings.It only takes effect when --disable-llvm-intrinsics is set.\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had better add an space before It

Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

wamr-compiler/main.c Outdated Show resolved Hide resolved
wamr-compiler/main.c Outdated Show resolved Hide resolved
core/iwasm/aot/aot_intrinsic.c Show resolved Hide resolved
Change-Id: I7ac4b0d5f06133cf737c29b22b21a86a08e1e863
@wenyongh wenyongh merged commit aafea39 into bytecodealliance:main Jul 6, 2023
368 checks passed
@no1wudi no1wudi deleted the intrinsic branch July 6, 2023 10:24
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants