-
Notifications
You must be signed in to change notification settings - Fork 129
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
Why ObjectTextSizeOz is bigger than ObjectTextSizeO0 ? #824
Comments
In addition to Cbench, a similar situation occurs with many benchmarks in NPB |
On the other hand, I use 2 ways to test , ~/.local/share/compiler_gym/llvm-v0/bin/opt adpcm.bc -Oz -o adpcm_opt_Oz.bc ~/.local/share/compiler_gym/llvm-v0/bin/opt adpcm.bc -O3 -o adpcm_opt_O3.bc |
~/.local/share/compiler_gym/llvm-v0/bin/clang -c -O0 adpcm.bc -o adpcm_O0.o ~/.local/share/compiler_gym/llvm-v0/bin/clang -c -Oz adpcm.bc -o adpcm_Oz.o ~/.local/share/compiler_gym/llvm-v0/bin/clang -c -O3 adpcm.bc -o adpcm_O3.o |
IIUC, compiler_gym behave like below, this may explain why these two results are different. clang -O1 -Xclang -disable-llvm-passes -Xclang -disable-llvm-optzns -c adpcm.bc
opt -O0 -c adpcm.bc -o adpcm_O0.bc
opt -Oz -c adpcm.bc -o adpcm_Oz.bc
opt -O3 -c adpcm.bc -o adpcm_O3.bc However, it also confused me that ObjectTextSizeOz > ObjectTextSizeO0. I don't know what happend... |
Yes @yingluosanqian you are correct, the LlvmEnv first uses clang to lower to a bitcode, then uses Cheers, |
❓ Questions and Help
I tested the code size in relation to the platform and this is my code. My compilergym version is 0.25 and the benchmark i used is cbench.
this is result
I want to know why ObjectTextSizeOz is bigger than ObjectTextSizeO0 ?
I optimize adpcm program with -O3 and -Oz in the command line
and the result is
why the result is different from compilergym?Is this normal?
Additional Context
The text was updated successfully, but these errors were encountered: