This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SSA usage question


    I meant "show me code".  Both in its original Ada form and what you
    propose to generate in GIMPLE.

Sorry.

    So, you want a reference like 'a[3]' to show up as 'a[3,v,x]' where 'v'
    is TYPE_MIN_VALUE and 'x' is TYPE_SIZE_UNIT?  Would 'v' and 'x' be set
    sometime before the reference?

Yes, except:

(1) I realized I made a mistake.  "x" can't be TYPE_SIZE_UNIT, but has
to be TYPE_SIZE_UNIT divided by the constant which is TYPE_ALIGN of the
element type divided by BITS_PER_UNIT.  The reason is that then the
proper multiplication will be made by get_inner_reference for the use
of highest_pow2_factor.

(2) We don't need to do this (and probably shouldn't) if they are constant.

(3) It isn't exactly TYPE_MIN_VALUE but the result of
SUBSTITUTE_PLACEHOLDER_IN_EXPR with that as the first argument and 
TREE_OPERAND (array_ref, 0) as the second.

By the way, I'm going to check in my changes to the Ada front end early
this afternoon.  It's far from working, but does build, which is an
advantage over what's there.  It'll let people see for themselves what's
going on.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]