-
Notifications
You must be signed in to change notification settings - Fork 590
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
Conversation
14e41a7
to
8ff7999
Compare
wamr-compiler/main.c
Outdated
@@ -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"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
core/iwasm/aot/aot_intrinsic.c
Outdated
} | ||
|
||
/* Handle other single items */ | ||
for (uint32 i = 0; i < g_intrinsic_count; i++) { |
There was a problem hiding this comment.
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 { ... }
.
There was a problem hiding this comment.
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
Outdated
printf(" settings.\n"); | ||
printf(" It only takes effect when --disable-llvm-intrinsics is set.\n"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
core/iwasm/aot/aot_intrinsic.c
Outdated
|
||
/* Handle 'all' group */ | ||
if (strstr(comp_ctx->builtin_intrinsics, "all")) { | ||
for (uint32 i = 0; i < g_intrinsic_count; i++) { |
There was a problem hiding this comment.
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.
wamr-compiler/main.c
Outdated
@@ -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"); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Change-Id: I7ac4b0d5f06133cf737c29b22b21a86a08e1e863
…liance#2341) Refer to doc/xip.md for details.
Refer to xip.md for detail