This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: thanks for the memory work
- From: law at redhat dot com
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Steven Bosscher <s dot bosscher at student dot tudelft dot nl>, gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Tue, 25 Nov 2003 20:02:48 -0700
- Subject: Re: thanks for the memory work
- Reply-to: law at redhat dot com
In message <1069809446.22241.2045.camel@p4>, Andrew MacLeod writes:
>> > So an interesting question then becomes can we _cleanly_ avoid use of the
>> > varray in the general case. That would reduce the number of operand
>> >varrays
>>
>
>We can.
Good.
>> I think the iterator API + some magic to recognize most common cases
>> would do the job here. I plan to look into this once I get my patches
>> queue shorter, but I won't mind anyone beating me :)
>>
>
>I think we'll pay a penalty if we don't cache the information and
>instead try to recreate it each time, even for the common cases. Too
>many ifs executed all the time. I certainly write code assuming that use
>and def access is quick.
That is certainly a concern. In fact that's one of the reasons why I
wasn't even going to consider special casing uses, vdefs or vuses.
defs is the only one I thought that it might make sense to consider.
>As I discussed earlier, I plan to make all the real USE and DEF ops for
>all the stmt's come out of a single array, or be cached in the
>annotation for the common case like immediate_uses works now. Whichever
>works out best.
Even if they come out of a single array, I don't see how that necessarily
helps the memory consumption problems -- since you've still got to
provide the operand walkers indices into that array.
jeff