Problem with use of TYPE_SIZE in tree optimizers
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Thu Oct 28 03:09:00 GMT 2004
I'm running into a problem when SSA_NAME nodes that are actually in use
are being freed. I traced this down to some improper uses of TYPE_SIZE
in the tree optimizers.
The tree optimizers can only use TYPE_SIZE and TYPE_SIZE_UNIT if they are
known to be INTEGER_CST. Otherwise, we have "hidden operands", which are
not permitted in GIMPLE.
There are exactly three places that violate this rule. One is in
tree-mudflap.c, but in a function has no comments in front of it (I thought
these were supposed to be supplied before the merge?), so I don't know what
it's supposed to do. That was not the one that's causing problems.
The ones that *are* causing problems are in
tree-data-ref.c:estimate_niter_from_size_of_data.
element_size should be array_ref_element_size, but there's no safe way of
referencing the size of the array itself.
I suspect that this routine should simply return if either is not an
INTEGER_CST, but I'm not sure. Does that seem right?
More information about the Gcc
mailing list