[PATCH] D17884: Disallow duplication of imported entities
don hinton via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 12:10:07 PST 2016
Actually, this change doesn't add anything to LLVMContext. However, it
does change the type of LLVMContextImpl::DIImportedEntitys from DenseSet to
SetVector, which obviates the need to keep an additional vector, since
that's what SetVector does anyway.
Changing the type did require the addition of a couple of macros and
overloaded methods, as well as exposing the underlying DenseSet in
SetVector in order to efficiently check existence before new'ing a new
instance of DIImportedEntity.
It also allowed us to remove all the extra vector code from DIBuilder.
On Mon, Mar 7, 2016 at 2:51 PM, David Blaikie via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Pretty sure we shouldn't be adding things to LLVMContext for this, but I
> haven't looked closely at the patch/followed the discussion that got us
> there in the first place. Will come back to this when I get a chance
> (probably later this week) but I'm mentioning it in case others
> reading/interacting on the thread can figure it out before then.
>
> On Mon, Mar 7, 2016 at 9:18 AM, Amjad Aboud via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> aaboud updated this revision to Diff 49973.
>> aaboud added a comment.
>>
>> Another try, this time I am uploading suggested solution by Don Hinton.
>> He is suggesting to make "imports" field in DICompileUnit of new type
>> "unique vector".
>> Then we can get rid of AllImportedEntitys container and use directly the
>> LLVMContext::impl::DIImportedEntitys instead
>>
>>
>> http://reviews.llvm.org/D17884
>>
>> Files:
>> include/llvm/ADT/SetVector.h
>> include/llvm/IR/Metadata.def
>> lib/IR/DIBuilder.cpp
>> lib/IR/LLVMContextImpl.h
>> lib/IR/Metadata.cpp
>> lib/IR/MetadataImpl.h
>> unittests/IR/IRBuilderTest.cpp
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160307/00cffc9f/attachment.html>
More information about the llvm-commits
mailing list