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

wamrc: Add --stack-usage option #2158

Merged
merged 5 commits into from
Apr 28, 2023
Merged

Conversation

yamt
Copy link
Collaborator

@yamt yamt commented Apr 27, 2023

No description provided.

core/iwasm/compilation/aot_llvm_extra2.cpp Show resolved Hide resolved
core/iwasm/compilation/aot_llvm_extra2.cpp Show resolved Hide resolved
case LLVMCodeGenLevelDefault:
return llvm::CodeGenOpt::Default;
case LLVMCodeGenLevelAggressive:
return llvm::CodeGenOpt::Aggressive;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

core/iwasm/compilation/aot_llvm_extra2.cpp Show resolved Hide resolved
core/iwasm/compilation/aot_llvm.c Show resolved Hide resolved
core/iwasm/compilation/aot_llvm_extra2.cpp Show resolved Hide resolved
@yamt
Copy link
Collaborator Author

yamt commented Apr 27, 2023

@wenyongh i updated after your feedback. thank you.

@lum1n0us
Copy link
Collaborator

I am all OK with the code.

I am just curious about how to use it, May I have a quick show on it?

@yamt
Copy link
Collaborator Author

yamt commented Apr 28, 2023

I am all OK with the code.

I am just curious about how to use it, May I have a quick show on it?

spacetanuki% ~/git/wasm-micro-runtime/wamr-compiler/b2/wamrc -o toywasm.aot --stack-usage=toywasm.su toywasm
Create AoT compiler with:
  target:        x86_64
  target cpu:    skylake
  cpu features:  
  opt level:     3
  size level:    1
  output format: AoT file
Compile success, file toywasm.aot was generated.
spacetanuki% head toywasm.su     
WASM Module:aot_func#0  0       static
WASM Module:aot_func#1  0       static
WASM Module:aot_func#2  8       static
WASM Module:aot_func#3  40      static
WASM Module:aot_func#4  8       static
WASM Module:aot_func#5  104     static
WASM Module:aot_func#6  72      static
WASM Module:aot_func#7  72      static
WASM Module:aot_func#8  40      static
WASM Module:aot_func#9  72      static
spacetanuki% 

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

@wenyongh wenyongh merged commit 2b896c8 into bytecodealliance:main Apr 28, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants