On 17/10/2008, Chris Lattner <clattner at apple.com> wrote:> Please no flag. If we want to fix this problem, lets do it right. To > me this consists of some flag on GlobalVariable that says that it is > 'mergable' or something like that.Wouldn't it be slightly cleaner to mark the distinct objects in the LLVM intermediate representation? This would make the default case the one resulting in best code, and seems to me to follow the principle of structural equivalence of types (and values) used elsewhere. -- Dan Villiom Podlaski Christiansen, stud.scient. danchr at daimi.au.dk, danchr at gmail.com
On Oct 17, 2008, at 11:18 AM, danchr at gmail.com wrote:> On 17/10/2008, Chris Lattner <clattner at apple.com> wrote: >> Please no flag. If we want to fix this problem, lets do it right. >> To >> me this consists of some flag on GlobalVariable that says that it is >> 'mergable' or something like that. > > Wouldn't it be slightly cleaner to mark the distinct objects in the > LLVM intermediate representation?That is what I'm suggesting. Each llvm IR global variable would have its own flag. -Chris
Hi Chris,> > Wouldn't it be slightly cleaner to mark the distinct objects in the > > LLVM intermediate representation? > That is what I'm suggesting. Each llvm IR global variable would have > its own flag.I think the suggestion is to have a "notmergable" flag instead of a "mergeable" flag. In practice, it doesn't really matter, but I guess you'll see the difference in the IR. I agree here that it would be more logical to have a notmergable (or "distinct" ?) flag, instead of a mergeable flag, though it's not quite critical. Gr. Matthijs -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081020/7e6a9650/attachment.sig>