[apple-ppc-branch] My CONSTRUCTORs are getting cloned!
Ziemowit Laski
zlaski@apple.com
Tue May 4 20:52:00 GMT 2004
On 4 May, 2004, at 13.13, Andrew Pinski wrote:
> On May 4, 2004, at 14:10, Ziemowit Laski wrote:
>
>> (I suspect this applies to tree-ssa as well.)
>>
>> In the past (i.e., during 3.3 days), multiple CONSTRUCTORs (made via
>> a call to build_constructor()) containing identical data would get
>> uniqued. But in the apple-ppc-branch, this does not happen. As a
>> countermeasure, I added hashing logic to my code so that only a single
>> CONSTRUCTOR with a given contents ever gets created, only to discover
>> that it spawns multiple copies of itself in the final assembly output.
>> The CONSTRUCTOR in question gets referenced (via an ADDR_EXPR) in
>> several places during compilation, and the clones appear to be created
>> as a result of some (though not all) of these references.
>>
>> Does anyone have any suggestions as to how to fix this? I cannot
>> quite
>> believe that this CONSTRUCTOR-cloning behavior is intentional...
>
> Here is some history:
>
> build_constructor in 3.3 only existed in the front-ends.
> While in 3.4.0 and above there is a generic build_constructor in
> tree.c.
> There is objc_build_constructor which exists still in the objc
> front-end.
> The reason why you think it was uniqued because it called convert just
> like what objc_build_constructor does still.
Hmm... I'll try calling convert() on my initializer elements, just like
objc_build_constructor() does, but I honestly
don't think that should or would make a difference...
--Zem
--------------------------------------------------------------
Ziemowit Laski 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group Cupertino, CA USA 95014-2083
Apple Computer, Inc. +1.408.974.6229 Fax .5477
More information about the Gcc
mailing list