More on gimplify:create_tmp_var
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Sun Jun 6 17:46:00 GMT 2004
No, I don't. Why? Because get_inner_reference is not type safe.
I don't follow. The issue isn't type safety.
For access efficiency, we want to nest ARRAY_REF, COMPONENT_REF, and
the other references. These are all handled in get_inner_reference as
a single access, by merging all the offsets. So *anything* that it can
handle should be gone "inside" by this routine.
I think you should be generating <INDIRECT_REF <NOP_EXPR <VAR>>>
instead of using VIEW_CONVERT_EXPR after the fact.
That seems *far* worse. Because then the INDIRECT_REF will *have* to
make a temporary and that temporary is often variable-sized. It seems
we'd have lots of copies.
Except that as a short-term hack you'll have to use a non-aliasing
type variant of the original type for the INDIRECT_REF.
I don't follow.
The point is that a very deep nest of COMPONENT_REF, VIEW_CONVERT_EXPR,
and ARRAY_REF is quite common in Ada. We don't need to make a temporary
(or want to) of any of the aggregates in between. We also don't want to
take their address since they are non-addressable.
More information about the Gcc
mailing list