-
Out of curiosity, I wanted to check what the shared object size is for MIR (excluding When building using I have a couple of questions:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thank you for interesting in MIR-project.
The both versions contain debug information. Non-debug version uses
Yes, I guess, it is possible. First of all, -g can be removed and -Os should be used. It gives 230K code (text+data) w/o c2mir. The smaller code size can be reached by switching of unused code, e.g. if you use only API to create MIR you don't need read binary MIR and you don't need to read textual MIR. If you don't need to save MIR, you can switch writing MIR binary to a file. I am sure you can reach 170KB in this case. A lot of code is used to print debug info. This code can be also switched off for a release code. Also different macros help to switch off many optimizations in MIR-generator. So MIR-code size can be varied considerably. Although using such macros are not documented and not tested regularly. |
Beta Was this translation helpful? Give feedback.
Thank you for interesting in MIR-project.
The both versions contain debug information. Non-debug version uses
-O3
. Very aggressive optimizations (including inlining) are used in this case and this results in bigger code size and bigger debug information.