Open pgkeller opened 4 months ago
@tooniz mentioned that -g is used by default and causing RISCV code size increase ?
@tooniz mentioned that -g is used by default and causing RISCV code size increase ?
Yes, need to look into that too. I'm surprised that -g affects code size (and not just meta data), certainly we don't want to pay that cost by default
brisc/ncrisc are currently compiled w/ -Os for legacy reasons this results in the compiler not inlining most fns necessitating the use of FORCE_INLINE which isn't alway the right answer we should compile these kernels w/ -O3 by default however, some kernels may get too big w/ -O3, so at the time of the change we should add a kernel argument for optimization level, at least to go from -O3 to -Os (and maybe O1 and O1?). users should have some API recourse if their kernel doesn't fit
we should also consider compiling the firmware w/ -Os as most of firmware is initialization code, though we need to confirm the kernel launch code doesn't suffer...