search for: smallset

Displaying 20 results from an estimated 48 matches for "smallset".

Did you mean: smallest
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...
2011 Jul 11
0
[LLVMdev] Best method for filtering LLVM container types?
...9;m filtering, although I'm concerned about the overhead of copying the set. > > What I'm wondering is what's the best practice for these kinds of operations? I'm not sure if LLVM has a preferred idiom, although I'm sure copying elements is fine in most cases. Ideally, SmallSet iterators would work just like std::set iterators so the containers would be interchangeable. But I don't see an easy way to implement those semantics. Unless I'm missing something, it seems fairly easy to implement it = container.erase(it) in SmallSet with some care to check for underlying...
2011 Jul 09
2
[LLVMdev] Best method for filtering LLVM container types?
I'm using the various LLVM set containers (SmallPtrSet and the like), and something I need to do fairly often is iterate over a set, removing all elements that don't pass a test. Now, doing this on lists is fairly straightforward using the "it = container.erase(it)" idiom so as to keep the iterator valid during the delete. However, the set classes don't have a means to both
2012 Jun 18
2
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
...good to me. I have a couple of minor comments: > > +void State::AddInsnClass(unsigned InsnClass, > Add a top level comment describing the function > > + std::map<State*, std::set<Transition*, ltTransition>, ltState> > stateTransitions; > You should be able to use SmallSet here. Also, this line exceeds 80 > columns. I tried but SmallSet is not iterable. SmallSetPtr could be useful here but it doesn't allow custom sorting. > > > On a related note, is the CachedTable mechanism in DFAPacketizer.h > useful for your architecture? Currently the DFA...
2012 Jun 25
2
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
...> >>> +void State::AddInsnClass(unsigned InsnClass, >>> Add a top level comment describing the function >>> >>> + std::map<State*, std::set<Transition*, ltTransition>, ltState> >>> stateTransitions; >>> You should be able to use SmallSet here. Also, this line exceeds 80 >>> columns. >> >> I tried but SmallSet is not iterable. SmallSetPtr could be useful >> here but it doesn't allow custom sorting. >> >>> >>> >>> On a related note, is the CachedTable mechanism in DFAP...
2012 Jul 12
1
[LLVMdev] llvm::DenseSet with reverse iterator
UniqueVector is 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 s...
2016 Jan 27
2
Skip redundant checks in AliasSet::aliasesUnknownInst
...alias sets from AliasSetTracker::findAliasSetForUnknownInst. I think that Philip proposed something similar to your approach in https://llvm.org/bugs/show_bug.cgi?id=23077. 2016-01-24 22:44 GMT+05:00 Daniel Berlin <dberlin at dberlin.org>: > It sounds like UnknownInsts should really be a SmallSet, SmallPtrSet, or > DenseSet (if you can't do the others). > > Otherwise, even with your patch, we are still wasting time traversing and > copying and .... the unknown instructions. > > If that doesn't work, I suspect the way you get dupes is through mergeSetIn, > so you...
2012 Jun 20
0
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
...of minor comments: >> >> +void State::AddInsnClass(unsigned InsnClass, >> Add a top level comment describing the function >> >> + std::map<State*, std::set<Transition*, ltTransition>, ltState> >> stateTransitions; >> You should be able to use SmallSet here. Also, this line exceeds 80 >> columns. > > I tried but SmallSet is not iterable. SmallSetPtr could be useful here > but it doesn't allow custom sorting. > >> >> >> On a related note, is the CachedTable mechanism in DFAPacketizer.h >> useful for...
2012 Jun 26
0
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
...void State::AddInsnClass(unsigned InsnClass, >>>> Add a top level comment describing the function >>>> >>>> + std::map<State*, std::set<Transition*, ltTransition>, ltState> >>>> stateTransitions; >>>> You should be able to use SmallSet here. Also, this line exceeds 80 >>>> columns. >>> >>> I tried but SmallSet is not iterable. SmallSetPtr could be useful >>> here but it doesn't allow custom sorting. >>> >>>> >>>> >>>> On a related note, is the...
2012 Jun 15
0
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
Hi Ivan, The patch looks good to me. I have a couple of minor comments: +void State::AddInsnClass(unsigned InsnClass, Add a top level comment describing the function + std::map<State*, std::set<Transition*, ltTransition>, ltState> stateTransitions; You should be able to use SmallSet here. Also, this line exceeds 80 columns. On a related note, is the CachedTable mechanism in DFAPacketizer.h useful for your architecture? Currently the DFA generator generates one table for a given architecture. I had originally added the CachedTable mechanism since for a given compilation an...
2016 Jan 24
4
Skip redundant checks in AliasSet::aliasesUnknownInst
Dear llvm contributors, Could you please advise me how to skip checks, which are performed in AliasSet::aliasesUnknownInst, of unknown instructions from different alias sets of an alias set tracker that is a parameter of ‘AliasSetTracker::add(const AliasSetTracker &AST)’? If this wasn’t available at the moment and someone could review me, I would try to implement it. A temporary patch can be
2012 Jun 26
4
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
...lass(unsigned InsnClass, >>>>> Add a top level comment describing the function >>>>> >>>>> + std::map<State*, std::set<Transition*, ltTransition>, ltState> >>>>> stateTransitions; >>>>> You should be able to use SmallSet here. Also, this line exceeds 80 >>>>> columns. >>>> I tried but SmallSet is not iterable. SmallSetPtr could be useful >>>> here but it doesn't allow custom sorting. >>>> >>>>> >>>>> On a related note, is the Cache...
2007 Dec 04
2
[LLVMdev] SmallPtrSet Iterator Behavior
What are the rules regarding iterator stability for SmallPtrSet? I'm running into a problem where erasing an element seems to invalidate iterators that are not pointing at the erased element. Specifically, the set is in small mode, I advance an iterator to the last element in the set (not end(), but one before) and then erase the second-to-last element. I understand that the last element
2007 Dec 04
0
[LLVMdev] SmallPtrSet Iterator Behavior
...but one before) and then erase the > second-to-last element. I understand that the last element will replace Right, deleting an element will invalidate any iterators past it, just like a vector. I don't know of a good solution to this that doesn't break the efficiency properties of smallset. Do you? -Chris -- http://nondot.org/sabre/ http://llvm.org/
2007 Dec 04
1
[LLVMdev] SmallPtrSet Iterator Behavior
...hen erase the > > second-to-last element. I understand that the last element will replace > > Right, deleting an element will invalidate any iterators past it, just > like a vector. I don't know of a good solution to this that doesn't break > the efficiency properties of smallset. Do you? What I've done is code up a version of erase() that returns an iterator to the next element. There still seem to be some problems that I'm looking into. This interface has the side benefit of being standard-library compatible and can be used with standard algorithms. If I get...
2012 Aug 25
3
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
...ng up redundant information. Transitions doesn't contains 'From' state anymore because they are folded into it. - Using STLExtras functions. - Removed old and unused API's (e.g. addTransition in DFA) The new patch is attached but if you prefer (2) I can remake it. I failed to use SmallSet to store the transitions in State because I needed to iterate on it. What kind of llvm structure may I use? Ivan > > -Anshu > -------------- next part -------------- A non-text attachment was scrubbed... Name: DFAPacketizerEmitter.new.patch Type: text/x-patch Size: 8628 bytes Desc: no...
2012 Jun 27
0
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
...ass, >>>>>> Add a top level comment describing the function >>>>>> >>>>>> + std::map<State*, std::set<Transition*, ltTransition>, ltState> >>>>>> stateTransitions; >>>>>> You should be able to use SmallSet here. Also, this line exceeds 80 >>>>>> columns. >>>>> I tried but SmallSet is not iterable. SmallSetPtr could be useful >>>>> here but it doesn't allow custom sorting. >>>>> >>>>>> >>>>>> On a re...
2017 May 27
6
Should we split llvm Support and ADT?
...ntEqClasses.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/PointerUnion.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SparseBitVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Stri...
2012 Jun 28
3
[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
...;>>> Add a top level comment describing the function >>>>>>> >>>>>>> + std::map<State*, std::set<Transition*, ltTransition>, ltState> >>>>>>> stateTransitions; >>>>>>> You should be able to use SmallSet here. Also, this line exceeds 80 >>>>>>> columns. >>>>>> I tried but SmallSet is not iterable. SmallSetPtr could be useful >>>>>> here but it doesn't allow custom sorting. >>>>>> >>>>>>> >>>...
2009 Aug 13
2
[LLVMdev] Build errors: llvm-gcc 4.3-2.5, x86-64.
...; ours is compiled to a Debugging version. llvm-gcc, though, is angry. I get the following error (with path prefixes shortened for convenience) when compiling llvm-gcc: > In file included from [...]/llvm/include/llvm/ADT/SmallPtrSet.h:20, > from [...]/llvm/include/llvm/ADT/SmallSet.h:18, > from [...]/llvm/include/llvm/ADT/SetVector.h:23, > from ../../llvm-gcc-src/gcc/llvm-internal.h:38, > from ../../llvm-gcc-src/gcc/llvm-backend.cpp:23: > [...]/llvm/include/llvm/Support/DataTypes.h:38:3: error: #error "Must #...