search for: smalldensemap

Displaying 10 results from an estimated 10 matches for "smalldensemap".

2017 Jun 30
2
llvm-profdata determinism
I haven't tested it, but it looks to me like llvm-profdata merge (well, InstrProfWriter specifically) would not have deterministic output. Certainly the textual output iterates over FunctionData which is a StringMap of SmallDenseMaps, neither of which has deterministic iteration. The binary writing looks like it'd have similar issues - looping through these unordered maps & writing output (eg: InstrProfRecordWriterTrait::EmitData loops through the data in the same SmallDenseMap and writes content in that order so far...
2017 Jun 30
2
llvm-profdata determinism
...ie at gmail.com> wrote: > >> I haven't tested it, but it looks to me like llvm-profdata merge (well, >> InstrProfWriter specifically) would not have deterministic output. >> >> Certainly the textual output iterates over FunctionData which is a >> StringMap of SmallDenseMaps, neither of which has deterministic iteration >> > > Does the iteration order of these maps depend on the order of hashes (of > strings for StringMap)? > Right - that's my understanding. (Some folks have started adding interesting things to LLVM to try to help weed out thes...
2017 Jun 30
0
llvm-profdata determinism
...e: >> >>> I haven't tested it, but it looks to me like llvm-profdata merge (well, >>> InstrProfWriter specifically) would not have deterministic output. >>> >>> Certainly the textual output iterates over FunctionData which is a >>> StringMap of SmallDenseMaps, neither of which has deterministic iteration >>> >> >> Does the iteration order of these maps depend on the order of hashes (of >> strings for StringMap)? >> > > Right - that's my understanding. > > (Some folks have started adding interesting thing...
2013 Aug 25
1
[LLVMdev] Puzzles on DenseMap
I wrote some program using DensMap like this: =============================== SmallDenseMap<Value*, StringRef, 4> OpResult; Value *VP = GEP->getPointerOperand(); OpResult[VP] = parseVariable(VP); for(User::op_iterator sId = GEP->idx_begin(), eId = GEP->idx_end(); sId != eId; ++sId) { Value *VI = *sId; if(dyn_cast<ConstantInt>(*sId)) OpResult[VI] =...
2020 Nov 17
1
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...quot;did you mean SmallVector<T, >>> 3>"?), unique_ptr's custom deleters, etc. >>> >> >> I don't necessarily connect with the custom allocator / custom delete >> analogy right now, they seem too different to me. >> I'd look instead at SmallDenseMap and DenseMap maybe, or `std::map` and >> `std::unordered_map` which have different class names and aren't just >> differentiated with a trait passed as template argument. >> >> >>> >>> >> > Finally the simple `llvm::Vector` case to replace `Sma...
2015 Jan 14
3
[LLVMdev] Crash on invalid during LLVMContext destruction MDNode::dropAllReferences
...e/home/blaikie/dev/llvm/src/lib/Support/Unix/Signals.inc:481:1 #2 0x1f01653 SignalHandler(int) /usr/local/google/home/blaikie/dev/llvm/src/lib/Support/Unix/Signals.inc:198:60 #3 0x7f6893e22340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340) #4 0x1ae3a9f bool llvm::DenseMapBase<llvm::SmallDenseMap<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*>, unsigned long>, 4u, llvm::DenseMapInfo<void*>, llvm::detail::DenseMapPair<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*>, unsigned long> > >, void*,...
2020 Nov 17
0
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...data structures today "did you mean SmallVector<T, >> 3>"?), unique_ptr's custom deleters, etc. >> > > I don't necessarily connect with the custom allocator / custom delete > analogy right now, they seem too different to me. > I'd look instead at SmallDenseMap and DenseMap maybe, or `std::map` and > `std::unordered_map` which have different class names and aren't just > differentiated with a trait passed as template argument. > > >> >> >> > Finally the simple `llvm::Vector` case to replace `SmallVector<T, >>...
2020 Nov 17
2
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...way we > ask about other data structures today "did you mean SmallVector<T, > 3>"?), unique_ptr's custom deleters, etc. > I don't necessarily connect with the custom allocator / custom delete analogy right now, they seem too different to me. I'd look instead at SmallDenseMap and DenseMap maybe, or `std::map` and `std::unordered_map` which have different class names and aren't just differentiated with a trait passed as template argument. > > >> > Finally the simple `llvm::Vector` case to replace `SmallVector<T, 0>` > is because it is freque...
2016 Oct 14
2
RFC: Reducing the number of set classes in ADT
...y add their own API extensions, which are of course all different. I think we can do better than this. It seems to me that ideally we'd need only four set classes, down from ten: * DenseSet * SmallDenseSet * SetVector (uses std::vector and DenseMap) * SmallSetVector (uses SmallVector and SmallDenseMap) Let me try to convince you that this is feasible. * SmallPtrSet is already basically the same as SmallDenseSet. * StringSet is just a DenseSet with a special key type that's an owning string, but where you can do lookups given a StringRef. This is like DenseMap::find_as. * SmallS...
2020 Nov 16
2
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
On Mon, Nov 16, 2020 at 2:12 PM David Blaikie <dblaikie at gmail.com> wrote: > On Mon, Nov 16, 2020 at 1:55 PM Mehdi AMINI <joker.eph at gmail.com> wrote: > > On Mon, Nov 16, 2020 at 12:55 PM David Blaikie <dblaikie at gmail.com> > wrote: > >> > >> I will say I'm not a huge fan of adding even more names for things in > >> this fairly