> > The job to do this is final value replacement, not sinking (we do not > sink non-invariant expressions - you'd have to translate them through > the loop-closed SSA exit PHI node, certainly doable, patches > welcome ;)). >
Richard, In final value replacement, expression "&a + D.xxxx" can be figured out, while "&a[i_xxx]" failed to be CHRECed, so I'm wondering if we should lower &a[i_xxx] to "&a + unitsize(a) * i_xxx" first? It seems GCC intends to keep &a[i_xxx] until cfgexpand pass. Or we have to directly modify CHREC algorithm to get it calculated? Appreciate your kindly help in advance! Thanks, -Jiangning