vg_leak issues
Tim Northover
t.p.northover at gmail.com
Thu Nov 14 09:39:39 PST 2013
>> +unsigned ARMFastISel::getLibcallReg(const Twine &Name) {
>> + GlobalValue *GV = new GlobalVariable(Type::getInt32Ty(*Context), false,
>> + GlobalValue::ExternalLinkage, 0, Name);
>> + return ARMMaterializeGV(GV, TLI.getValueType(GV->getType()));
>> }
>>
>> GV leaks.
>
> This is a particularly nasty one. During codegen the IR module is
> constant, so we cannot add to it. It looks like what is needed is for
> MI to have a way to represent a variable without creating an IR level
> one.
Isn't that what ExternalSymbol is for? Though dealing with both of
those cases is rather annoying, you frequently have to duplicate code
because a global is almost, but not quite, identical to an external.
Tim.
More information about the llvm-commits
mailing list