search for: smallsetvector

Displaying 13 results from an estimated 13 matches for "smallsetvector".

2016 Oct 14
2
RFC: Reducing the number of set classes in ADT
...nk we have too many different set classes. They have incompatible APIs and surprising behavior. I think we can reduce their number substantially. Dear all, The following is a subset of the set classes we have in ADT: * DenseSet * SmallDenseSet (https://reviews.llvm.org/D25628) * SetVector * SmallSetVector * SmallSet * SmallPtrSet * StringSet * FoldingSet * ContextualFoldingSet * FoldingSetVector Every one of these classes has quirks. Here are some particularly bad ones: * SmallSet falls back to std::set<T> when it runs out of inline storage (which itself is pretty bad because std::s...
2015 Sep 13
3
RFC: faster simplifyInstructionsInBlock/SimplifyInstructions pass
...ursive approach, to avoid needless revisitation and being repeatedly forced to jump back to the start of the BB if a handle is invalidated. 2. Only insert operands to the worklist if they become unused after a dead instruction is removed, so we don’t have to visit them again in most cases. 3. Use a SmallSetVector to track the worklist. 4. Instead of pre-initting the SmallSetVector like in DeadCodeEliminationPass, only put things into the worklist if they have to be revisited after the first run-through. This minimizes how much the actual SmallSetVector gets used, which saves a lot of time. static bool simp...
2012 Jul 12
1
[LLVMdev] llvm::DenseSet with reverse iterator
...s an stl map coupled with an stl vector[1], which seems very undesirable for you. As far as SmallVector + slow search, I believe that is precisely what the implementation of SmallSet does until it has to grow, after which it uses an stl set[2]. If you're always staying within your small number, SmallSetVector would be wasteful as the SmallSet would itself also have a SmallVector. If you need to access in insertion order then go with SmallVector + slow search. If you need sorted order then go with stl set. If you don't care, pick which one makes the most sense for your constraints: SmallVector uses...
2012 Jul 12
0
[LLVMdev] llvm::DenseSet with reverse iterator
Hi, Thanks a lot for the help! It seems that the SmallSetVector is the ADT I need (interface-wise). Is more efficient than llvm::UniqueVector? In my use case I have to insert a new element in the structure only if the element is unique. I hardly expect more than 32 elements. Do you think I gain a lot if I use the SmallSetVector instead of using SmallVect...
2012 Jul 12
2
[LLVMdev] llvm::DenseSet with reverse iterator
Something that might interest you is the SetVector, which as its name implies is both a set and a vector paired together. You get the advantage of doing set-like operations (search) on the set and vector-like operations (iteration, random access) on the vector, but at the cost of paying the price for both data structures when modifying the structure (and double the memory). This seems like it
2016 Nov 15
9
Non-determinism in LLVM codegen
...ySSA/cyclicphi.ll// // LLVM :: Transforms/Util/MemorySSA/many-dom-backedge.ll// // LLVM :: Transforms/Util/MemorySSA/many-doms.ll// // LLVM :: Transforms/Util/MemorySSA/phi-translation.ll/ I have posted the following patches which fix some of the above failures by changing SmallPtrSet to SmallSetVector: *https://reviews.llvm.org/D26704** **https://reviews.llvm.org/D26705** **https://reviews.llvm.org/D26706* Here are the next steps which I would like to do: 1. Replicate this patch for other containers (like DenseMap) 2. Somehow enable reverse iteration in the lit framework for all tests so that...
2016 Nov 16
2
Non-determinism in LLVM codegen
...LVM :: Transforms/Util/MemorySSA/many-dom-backedge.ll >> LLVM :: Transforms/Util/MemorySSA/many-doms.ll >> LLVM :: Transforms/Util/MemorySSA/phi-translation.ll >> >> I have posted the following patches which fix some of the above >> failures by changing SmallPtrSet to SmallSetVector: >> https://reviews.llvm.org/D26704 >> https://reviews.llvm.org/D26705 >> https://reviews.llvm.org/D26706 > > Great, thanks for working on this! Unfortunately, you did not subscribe llvm-commits when you created these, so the list did not receive the customary notification....
2016 Dec 14
0
Non-determinism in LLVM codegen
...LLVM :: Transforms/Util/MemorySSA/many-dom-backedge.ll// > // LLVM :: Transforms/Util/MemorySSA/many-doms.ll// > // LLVM :: Transforms/Util/MemorySSA/phi-translation.ll/ > > I have posted the following patches which fix some of the above > failures by changing SmallPtrSet to SmallSetVector: > *https://reviews.llvm.org/D26704** > **https://reviews.llvm.org/D26705** > **https://reviews.llvm.org/D26706* > > Here are the next steps which I would like to do: > 1. Replicate this patch for other containers (like DenseMap) > 2. Somehow enable reverse iteration in the lit...
2020 Jun 24
6
[RFC] Compiled regression tests.
Am Mi., 24. Juni 2020 um 10:12 Uhr schrieb David Blaikie <dblaikie at gmail.com>: > > As mentioned in the Differential, generating the tests automatically > > will lose information about what actually is intended to be tested, > > Agreed - and I didn't mean to suggest tests should be automatically > generated. I work pretty hard in code reviews to encourage tests to
2017 Jun 01
5
[SemaCXX] Should we fix test failing due to reverse iteration?
I see that the following test fails if reverse iteration of SmallPtrSet is enabled: /clang/test/SemaCXX/warn-loop-analysis.cpp/ This is because in SemaStmt.cpp we iterate SmallPtrSet and output warnings about the variables not used in the loop. Expected output: /warning: variables 'i', 'j', and 'k' used in loop condition not modified/ Output with reverse iteration:
2020 Jul 01
6
[RFC] Compiled regression tests.
...a > non-semantic change in LLVM: > >     --- a/llvm/lib/Analysis/VectorUtils.cpp >     +++ b/llvm/lib/Analysis/VectorUtils.cpp >     @@ -642,8 +642,8 @@ MDNode *llvm::uniteAccessGroups(MDNode > *AccGroups1, MDNode *AccGroups2) { >          return AccGroups1; > >        SmallSetVector<Metadata *, 4> Union; >     -  addToAccessGroupList(Union, AccGroups1); >        addToAccessGroupList(Union, AccGroups2); >     +  addToAccessGroupList(Union, AccGroups1); > >        if (Union.size() == 0) >          return nullptr; > > This changes the order of access...
2020 Jul 01
5
[RFC] Compiled regression tests.
...e some difficulties with FileCheck, lets make a non-semantic change in LLVM: --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -642,8 +642,8 @@ MDNode *llvm::uniteAccessGroups(MDNode *AccGroups1, MDNode *AccGroups2) { return AccGroups1; SmallSetVector<Metadata *, 4> Union; - addToAccessGroupList(Union, AccGroups1); addToAccessGroupList(Union, AccGroups2); + addToAccessGroupList(Union, AccGroups1); if (Union.size() == 0) return nullptr; This changes the order of access groups when merging them. Same backgr...
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message ----- > From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org> > To: "Vaivaswatha Nagaraj" <vn at compilertree.com> > Cc: "LLVM Dev" <llvm-dev at lists.llvm.org> > Sent: Thursday, December 3, 2015 4:41:46 AM > Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA > >