> So what you are doing is basically not only rewriting memory references
> to possibly use TARGET_MEM_REF but also address uses to use
> &TARGET_MEM_REF.  I think this is a good thing in general
> (given instructions like x86 lea) and I would not bother distinguishing
> the different kind of uses.
>
> Richard.
>

You mean to change normal expr to &TMR(expr) form in order to utilize
x86 lea type instructions as much as possible. It is interesting. I
can experiment that idea later. I am not sure if it could simply work.
My concern is x86 lea still has some limitation (such as three
operands lea will have longer latency and can only be issued to
port1), if we change some expr to &TMR(expr), will it inhitbit cse
opportunity if codegen find out it is not good to use lea?

Thanks,
Wei.

Reply via email to