When IM2 mode is not activated, register I is not used at all.
This is the case for example with MSX computers where IM2 mode is never used.
Given the limitations of the Z80, it is a big waste not to be able to use a free register.
Would it be possible to have an option to allow the C compiler to use the I register as a storage register?
PS : I looked to see if a ticket on the subject didn't already exist, but I'm not sure if the "i register" search works well.
I don't think there would be much benefit: there are just 2 instructions that can use i: ld a, i and ld i, a. Both are 2 bytes and 9 cycles. That is cheaper than the 3 byte 19 cycles ld d(ix), r, but more expensive than the 1 byte 4 cycles ld r, r'. And the stack can be used as an operand to addition, etc: we have add a, d(ix), etc instructions.
So the register i would only be useful in a very specific situation: i not needed for interrupt mode, an 8 bit location is needed to hold a result currently in a that next will be needed in a again (but in between a is needed for other uses).
So while there is a situation where such use of i would provide a benefit, IMO there are lots of more important things to be done first.