Re: [eigen] binary bloat with recent sse stuff

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Whoops, 17KB for a null program.

The function specific constants (for sin,cos,log,exp) could be rolled
into the function body so that they are not visible outside. If the
functions are not instantiated, may be they won't be generated. Also,
what does compiling with -Os  give?

On Sat, Apr 4, 2009 at 1:54 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> Hi,
>
> Take the following advanced program:
>
> #include <Eigen/Core>
> int main(){}
>
> Compile with -msse2 and look at the generated symbols:
>
> bjacob@kiwi:~> g++ -msse2 -O2 -I kde/kdesupport/eigen2/ b.cpp -o b &&
> nm b | grep Eigen
> 080485e0 t _GLOBAL__I__ZN5Eigen7ei_plogIU8__vectorfEET_S2_
> 08048a20 T _ZN5Eigen7ei_pcosIU8__vectorfEET_S2_
> 08048c00 T _ZN5Eigen7ei_pexpIU8__vectorfEET_S2_
> 08048cc0 T _ZN5Eigen7ei_plogIU8__vectorfEET_S2_
> 08048b10 T _ZN5Eigen7ei_psinIU8__vectorfEET_S2_
> 0804a2f0 b _ZN5EigenL10ei_p4f_2piE
> 0804a050 b _ZN5EigenL11ei_p4f_halfE
> 0804a0d0 b _ZN5EigenL11ei_p4i_0x7fE
> 0804a0a0 b _ZN5EigenL11ei_p4i_not1E
> 0804a1a0 b _ZN5EigenL13ei_p4f_exp_hiE
> 0804a1b0 b _ZN5EigenL13ei_p4f_exp_loE
> 0804a2b0 b _ZN5EigenL16ei_p4f_coscof_p0E
> 0804a2c0 b _ZN5EigenL16ei_p4f_coscof_p1E
> 0804a2d0 b _ZN5EigenL16ei_p4f_coscof_p2E
> 0804a080 b _ZN5EigenL16ei_p4f_sign_maskE
> 0804a280 b _ZN5EigenL16ei_p4f_sincof_p0E
> 0804a290 b _ZN5EigenL16ei_p4f_sincof_p1E
> 0804a2a0 b _ZN5EigenL16ei_p4f_sincof_p2E
> 0804a2e0 b _ZN5EigenL18ei_p4f_cephes_FOPIE
> 0804a060 b _ZN5EigenL19ei_p4f_min_norm_posE
> 0804a1c0 b _ZN5EigenL20ei_p4f_cephes_LOG2EFE
> 0804a0e0 b _ZN5EigenL20ei_p4f_cephes_SQRTHFE
> 0804a1d0 b _ZN5EigenL20ei_p4f_cephes_exp_C1E
> 0804a1e0 b _ZN5EigenL20ei_p4f_cephes_exp_C2E
> 0804a1f0 b _ZN5EigenL20ei_p4f_cephes_exp_p0E
> 0804a200 b _ZN5EigenL20ei_p4f_cephes_exp_p1E
> 0804a210 b _ZN5EigenL20ei_p4f_cephes_exp_p2E
> 0804a220 b _ZN5EigenL20ei_p4f_cephes_exp_p3E
> 0804a230 b _ZN5EigenL20ei_p4f_cephes_exp_p4E
> 0804a240 b _ZN5EigenL20ei_p4f_cephes_exp_p5E
> 0804a0f0 b _ZN5EigenL20ei_p4f_cephes_log_p0E
> 0804a100 b _ZN5EigenL20ei_p4f_cephes_log_p1E
> 0804a110 b _ZN5EigenL20ei_p4f_cephes_log_p2E
> 0804a120 b _ZN5EigenL20ei_p4f_cephes_log_p3E
> 0804a130 b _ZN5EigenL20ei_p4f_cephes_log_p4E
> 0804a140 b _ZN5EigenL20ei_p4f_cephes_log_p5E
> 0804a150 b _ZN5EigenL20ei_p4f_cephes_log_p6E
> 0804a160 b _ZN5EigenL20ei_p4f_cephes_log_p7E
> 0804a170 b _ZN5EigenL20ei_p4f_cephes_log_p8E
> 0804a180 b _ZN5EigenL20ei_p4f_cephes_log_q1E
> 0804a190 b _ZN5EigenL20ei_p4f_cephes_log_q2E
> 0804a070 b _ZN5EigenL20ei_p4f_inv_mant_maskE
> 0804a250 b _ZN5EigenL23ei_p4f_minus_cephes_DP1E
> 0804a260 b _ZN5EigenL23ei_p4f_minus_cephes_DP2E
> 0804a270 b _ZN5EigenL23ei_p4f_minus_cephes_DP3E
> 0804a040 b _ZN5EigenL8ei_p4f_1E
> 0804a090 b _ZN5EigenL8ei_p4i_1E
> 0804a0b0 b _ZN5EigenL8ei_p4i_2E
> 0804a0c0 b _ZN5EigenL8ei_p4i_4E
>
> How can we prevent these unused constants from being generated?
>
> Also, why are the ei_pcos/sin/exp/log functions being generated?
>
> The code size is 17 kB.
>
> Benoit
>
>
>



-- 
Rohit Garg

http://rpg-314.blogspot.com/

Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/