search for: smallptrset

Displaying 20 results from an estimated 125 matches for "smallptrset".

2012 Mar 17
1
[LLVMdev] [llvm-commits] Review Request: Use SmallPtrSetImpl instead of SmallPtrSet in funciton IVUsers::AddUsersIfInteresting
hi, On Sat, Mar 17, 2012 at 2:11 AM, Andrew Trick <atrick at apple.com> wrote: > Yep. I normally do that. I was under some strange impression last night that SmallPtrSetImpl wasn't a template. The patch is incorrect because the SmallPtrSetImpl is neither a template nor has an "insert" function... After a detailed look at the header of SmallPtrSet, I found that the SmallPtrSetImpl has an "insert_imp" function which accepts void pointer as ar...
2016 Nov 15
9
Non-determinism in LLVM codegen
...erminism in LLVM codegen in the following scenarios: 1. Between back-to-back runs of the same LLVM toolchain 2. Between Release vs Release+Asserts toolchains 3. Between Linux vs Windows toolchains The main reasons for the non-determinism in codegen are: 1. Iteration of unordered containers (like SmallPtrSet, DenseMap, etc) where the iteration order is undefined 2. Use of non-stable sorts (like std:sort which uses quicksort) where the relative order of elements with the same key is undefined I wanted a way to uncover instances where iteration of unordered containers results in different codegen. So...
2016 Dec 14
0
Non-determinism in LLVM codegen
Everyone, The following patch to reverse iterate SmallPtrSet's has now been merged: https://reviews.llvm.org/D26718 This is how LLVM behavior will change due to this patch: - In LLVM builds with *assertions enabled*, SmallPtrSet's would always be reverse iterated by default. This default behavior can be overridden via the flag "-mllvm -rev...
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/ Out...
2016 Dec 14
2
Non-determinism in LLVM codegen
On Tue, Dec 13, 2016 at 4:57 PM, Grang, Mandeep Singh via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Everyone, > > The following patch to reverse iterate SmallPtrSet's has now been merged: > https://reviews.llvm.org/D26718 > > This is how LLVM behavior will change due to this patch: > - In LLVM builds with assertions enabled, SmallPtrSet's would always be > reverse iterated by default. > This default behavior can be overridden via th...
2016 Dec 14
0
Non-determinism in LLVM codegen
On Tue, Dec 13, 2016 at 6:39 PM, Hans Wennborg <hans at chromium.org> wrote: > On Tue, Dec 13, 2016 at 4:57 PM, Grang, Mandeep Singh via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> Everyone, >> >> The following patch to reverse iterate SmallPtrSet's has now been merged: >> https://reviews.llvm.org/D26718 >> >> This is how LLVM behavior will change due to this patch: >> - In LLVM builds with assertions enabled, SmallPtrSet's would always be >> reverse iterated by default. >> This default behavior...
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....
2016 Nov 16
2
Non-determinism in LLVM codegen
...1. Between back-to-back runs of the same LLVM toolchain >> 2. Between Release vs Release+Asserts toolchains >> 3. Between Linux vs Windows toolchains >> >> The main reasons for the non-determinism in codegen are: >> >> 1. Iteration of unordered containers (like SmallPtrSet, DenseMap, >> etc) where the iteration order is undefined >> 2. Use of non-stable sorts (like std:sort which uses quicksort) where >> the relative order of elements with the same key is undefined >> >> I wanted a way to uncover instances where iteration of unordered &...
2017 Jul 06
5
Uncovering non-determinism in LLVM - The Next Steps
...stances of non-determinism in llvm codegen. The major source of which was the iteration of unordered containers resulting in non-deterministic iteration order. In order to uncover such instances we had introduced "reverse iteration" of unordered containers (currently only enabled for SmallPtrSet). I would now like to take this effort forward and propose to do the following: 1. We are in the process of setting up an internal nightly buildbot which would build llvm with the cmake flag -DLLVM_REVERSE_ITERATION:BOOL=ON. This will make all supported containers iterate in reverse order by de...
2010 Feb 24
0
[LLVMdev] Working Cycle Check SmallPtrSet Change
Here's an actually working version of the change in the SelectionDAG cycle checking code to use SmallPtrSet. Again, apologies for royally screwing this one up. -Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: cyclecheck.patch Type: text/x-patch Size: 1598 bytes Desc: not available URL: <http://lists.llvm...
2007 Dec 04
0
[LLVMdev] SmallPtrSet Iterator Behavior
On Tue, 4 Dec 2007, David Greene wrote: > 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. Interesting question. > Specifically, the set is in small mode, I advance an iterator to the last > element in the set (not end(), but one before) an...
2016 Jan 27
2
Skip redundant checks in AliasSet::aliasesUnknownInst
Thank you for the idea! Could you please explain it? If I’m not mistaken, you advise to insert the unknown insts of an every AS from AliasSetTracker::add(const AliasSetTracker &AST) into a smallptrset and consequently append it to merged 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...
2007 Dec 04
1
[LLVMdev] SmallPtrSet Iterator Behavior
On Tuesday 04 December 2007 13:28, Chris Lattner wrote: > > 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 will replace > > Right, deleting an element will invalidate any iterators past it, just > like a vector.
2013 Oct 22
1
[LLVMdev] SmallPtrSet patch for MCJIT
...hes for all cases. pop_back() vs. clear() - since I knew there is one module only (we override the AddModule so EE can't get another) that what "popped" into my mind. clear() is just as good, changed. EE, JIT, MCJIT inheritance - the interpreter and the JIT would also benefit from a SmallPtrSet module manager rather than the current vector so if it's possible to create a module manager that makes sense for everyone, it could be moved back into EE along with the several duplicated functions. I clarified this in ~MCJIT comments and ExecutionEngine.h comment. As English is my second la...
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
2013 Oct 22
0
[LLVMdev] SmallPtrSet patch for MCJIT
...tic constructors/destructors in secondary modules, but it shouldn't be hard to add that. Definitely feel free to add more test cases! -Andy From: Yaron Keren [mailto:yaron.keren at gmail.com] Sent: Monday, October 21, 2013 10:57 PM To: <llvmdev at cs.uiuc.edu>; Kaylor, Andrew Subject: SmallPtrSet patch for MCJIT Hi Andy, Here is the patch. it incorporates: 1) your latest patch to SVN. 2) mcjit-module-state-optimization.patch. 3) the PtrSet changes. Other than the OwnedModules implementation there were other differences between 1) and 2), especially in the Finalize* functions, so please...
2017 Jul 06
2
Uncovering non-determinism in LLVM - The Next Steps
...codegen. The major source of which was the > > iteration of unordered containers resulting in non-deterministic > > iteration order. In order to uncover such instances we had introduced > > "reverse iteration" of unordered containers (currently only enabled for > > SmallPtrSet). > > I would now like to take this effort forward and propose to do the > > following: > > > > 1. We are in the process of setting up an internal nightly buildbot > > which would build llvm with the cmake flag - > > DLLVM_REVERSE_ITERATION:BOOL=ON. > > Thi...
2016 Oct 14
2
RFC: Reducing the number of set classes in ADT
...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::set will pwn your caches)....
2015 Sep 14
3
RFC: speedups with instruction side-data (ADCE, perhaps others?)
...However, the answer i got back when i mentioned this was "things like ptrset and densemap should only have a small performance difference from side data when used and sized right", and i've found this to mostly be true after looking harder. In the case you are looking at, i see: - SmallPtrSet<Instruction*, 128> Alive; This seems ... wrong. In fact, it seems optimally bad. This says the small ptr set size is 128. That is, the smallsize is 128. SmallPtrSet will linear search the array when it's size <= smallsize, and otherwise fall back to building a non-small array and u...
2013 Oct 22
2
[LLVMdev] SmallPtrSet patch for MCJIT
Hi Andy, Here is the patch. it incorporates: 1) your latest patch to SVN. 2) mcjit-module-state-optimization.patch. 3) the PtrSet changes. Other than the OwnedModules implementation there were other differences between 1) and 2), especially in the Finalize* functions, so please review that I got the right code. I got bitten by subtle bugs arising from MCJIT inheriting from EE: First, MCJIT