Hello,
In principle, I don't see anything forbidding Zdenek's idea.
Unfortunately, what I avoided to mention is that TARGET_MEM_REF nodes
are also transformed into pointer arithmetics
and the equivalent
INDIRECT_REF memory access... therefore, this is not an option even only
because of that.
hmm... why you do that? Could you please describe more precisely what
are you trying to achieve?
Sure!
The short answer is that, though most GIMPLE tree codes closely match
what is representable in the CIL bytecode, some do not; hence, such
codes are "lowered" into equivalent expressions that directly match what
is representable in the bytecode.
this seems quite close to what TARGET_MEM_REFs are designed for. IMHO,
the best way would be to lower the memory references to TARGET_MEM_REFs
(*) just once, sometime quite late in the optimization pipeline (just after
loop optimizations, for example), so that high-level optimizers/alias
analysis see the easy to understand code, while at least the essential
cleanups are performed on the lower level code.