[llvm-commits] metadata.h/cpp review stuff
Chris Lattner
clattner at apple.com
Tue Oct 20 14:48:29 PDT 2009
On Oct 20, 2009, at 7:08 AM, Devang Patel wrote:
>> This would shrink them significantly and reduce the games you have to
>> play with hiding getNumOperands, overloading operator new, etc.
>> Also,
>> MetadataBase doesn't have much common state, it isn't clear it needs
>> to exist at all.
>>
>> There is some seriously confused code circling around
>> MetadataBase::resizeOperands. It looks like half the code thinks
>> that
>> operands can happen, but half doesn't. Please remove all this stuff.
>
> It is trying to maintain following use counts
>
> !1 = { i32 1} ; [uses 1]
> !2 = { !1 } ; [uses 0]
>
> ...
> call @llvm.dbg.blah(!1, !2)
> ...
>
> Metadata used by another metadata is counted as regular uses. Metadata
> used by non-metadata values is not a normal use (it is invisible to
> the non-metadata value). This is why the hierarchy is based on User
> and operand list is only counting metadata uses.
Ok, I see now that you're doing this. But why? :) What capability
does this provide? Is there another way to get it? This capability
costs a lot of complexity, memory and compile time.
-Chris
More information about the llvm-commits
mailing list