Compiling the attached source file results in using current (rev #7891) svn results in a code size of 65 bytes. Doing so in the lospre branch results in a cvode size of 80 bytes. lospre only makes one change to the iCode: a new temporary is created an one of the parameters is assigned to this temporary.
If this temporary was spilt, the additional iCode would result in an ldhx followed by sthx with an imm operand, resulting in a total code size increase of 4 bytes. However the register allocator places it in hx, and we get a total code size increase of 15 bytes instead.
Compilation options were
--std-c99 --out-fmt-ihx --i-code-in-asm --no-peep --opt-code-size -ms08 --max-allocs-per-node 1000000
for both. The asm codes states "Register assignment is optimal." for both. Thus this is clearly a bug in register allocation or code generation (maybe an issue with the cost).
Log in to post a comment.