search for: densemap

Displaying 20 results from an estimated 461 matches for "densemap".

2013 Nov 04
2
[LLVMdev] compile error when using overloaded = operator of DenseMap
Hi, I am trying to implement Available Expressions data flow analysis. I created the following class (I am giving here code snippet.): namespace { typedef DenseMap<Expression, uint32_t> DMTy; //Expression is a class I defined. struct DataFlowValue { DMTy ExprMap; llvm::BitVector* DFV; // Functions operating on the data // bool operator==(const DataFlowValue V) const; void top(); /* set all elements */ void bot(); /* reset all...
2013 Nov 04
0
[LLVMdev] compile error when using overloaded = operator of DenseMap
On Mon, Nov 4, 2013 at 10:35 AM, Rekha R <rekharamapai at nitc.ac.in> wrote: > Hi, > > I am trying to implement Available Expressions data flow analysis. I created > the following class (I am giving here code snippet.): > > namespace { > typedef DenseMap<Expression, uint32_t> DMTy; //Expression is a class I > defined. > struct DataFlowValue { > DMTy ExprMap; > llvm::BitVector* DFV; > > // Functions operating on the data // > bool operator==(const DataFlowValue V) const; > void top(); /* set all el...
2018 Jul 25
2
are the LLD libraries thread safe?
...owed to call lld::elf::link in 2 different threads at the same time? Follows is an example Valgrind error I ran into when doing the above. I'll try putting a global resource lock on invoking LLD and see if it solves the problem. ==5467== Invalid write of size 8 ==5467== at 0x525509: llvm::DenseMapBase<llvm::DenseMap<llvm::CachedHashStringRef, int, llvm::DenseMapInfo<llvm::CachedHashStringRef>, llvm::detail::DenseMapPair<llvm::CachedHashStringRef, int> >, llvm::CachedHashStringRef, int, llvm::DenseMapInfo<llvm::CachedHashStringRef>, llvm::detail::DenseMapPair<llv...
2018 Jul 25
2
are the LLD libraries thread safe?
...>> >> Follows is an example Valgrind error I ran into when doing the above. >> >> I'll try putting a global resource lock on invoking LLD and see if it >> solves the problem. >> >> ==5467== Invalid write of size 8 >> ==5467== at 0x525509: llvm::DenseMapBase<llvm::DenseMap<llvm::CachedHashStringRef, >> int, llvm::DenseMapInfo<llvm::CachedHashStringRef>, >> llvm::detail::DenseMapPair<llvm::CachedHashStringRef, int> >, >> llvm::CachedHashStringRef, int, llvm::DenseMapInfo<llvm::CachedHashStringRef>, >&g...
2012 Jan 26
5
[LLVMdev] dense maps
Reading the LLVM Programmer's Manual, the description of DenseSet mentions: *Note that DenseSet has the same requirements for the value type that DenseMap <http://llvm.org/docs/ProgrammersManual.html#dss_densemap> has.* But when I read about DenseMap, I don't really see any requirements for the values, just a warning about space. On the other hand, the *keys* have special requirements, which aren't entirely clear to me. It says *F...
2012 Jan 26
0
[LLVMdev] dense maps
My problem was that the constructor for DenseMap has an undocumented constraint. explicit DenseMap(unsigned NumInitBuckets = 0) { init(NumInitBuckets); } if given an explicit argument, requires that the argument be a power of 2. It's checked by an assert in init(), but for some reason my code didn't trip the assertion. Is there a sp...
2016 Mar 15
2
RFC: DenseMap grow() slowness
What should we use instead of DenseMap? —escha > On Mar 15, 2016, at 3:30 PM, Xinliang David Li <xinliangli at gmail.com> wrote: > > yes it makes sense. Avoid using DenseMap when the size of the map is expected to be large but can not be pre-determined. > > David > > On Tue, Mar 15, 2016 at 3:07 PM, via...
2016 Mar 15
7
RFC: DenseMap grow() slowness
There’s a few passes in LLVM that make heavy use of a big DenseMap, one that potentially gets filled with up to 1 entry for each instruction in the function. EarlyCSE is the best example, but Reassociate and MachineCSE have this to some degree as well (there might be others?). To put it simply: at least in my profile, EarlyCSE spends ~1/5 of its time growing Dense...
2019 Sep 27
3
DenseMap/ValueMap: is M[New]=M[Old] valid ?
...GlobalMap[a] = GlobalMap[b]; } When compiled with Clang, ends up like this: define void @_Z4copyPvS_(i8*, i8*) #1 { %3 = alloca i8*, align 8 %4 = alloca i8*, align 8 store i8* %0, i8** %3, align 8 store i8* %1, i8** %4, align 8 %5 = call dereferenceable(8) i8** @_ZN4llvm12DenseMapBaseINS_8DenseMapIPvS2_NS_12DenseMapInfoIS2_EENS_6detail12DenseMapPairIS2_S2_EEEES2_S2_S4_S7_EixERKS2_(%"class.llvm::DenseMapBase"* getelementptr inbounds (%"class.llvm::DenseMap", %"class.llvm::DenseMap"* @GlobalMap, i32 0, i32 0), i8** dereferenceable(8) %4) %6 = l...
2015 Dec 11
3
Memory utilization problems in profile reader
On Fri, Dec 11, 2015 at 9:58 AM, Diego Novillo <dnovillo at google.com> wrote: > So, I traced it down to the DenseMaps in class FunctionSamples. I've > replaced them with two std::vector, and the read operation causes the > compiler to grow from 70Mb to 280Mb. With the DenseMaps, reading the > profile causes the compiler to grow from 70Mb to 3Gb. > > Somehow the DenseMaps are causing a 10x gro...
2011 Mar 15
0
[LLVMdev] [PATCH 1/5] Prevent infinite growth of the DenseMap.
From: José Fonseca <jfonseca at vmware.com> When the hash function uses object pointers all free entries eventually become tombstones as they are used at least once, regardless of the size. DenseMap cannot function with zero empty keys, so it double size to get get ridof the tombstones. However DenseMap never shrinks automatically unless it is cleared, so the net result is that certain tables grow infinitely. The solution is to make a fresh copy of the table without tombstones instead of dou...
2017 Apr 10
2
clang build failures using Visual Studio
...s reserved. ClangDiagnosticsEmitter.cpp c:\program files (x86)\microsoft visual studio\2017\community\VC\Tools\MSVC\14.10.25017\include\xmemory(126): error C2678: binary '*': no operator found which takes a left-hand operand of type 'const llvm::detail::DenseSetImpl<ValueT,llvm::DenseMap<ValueT,llvm::detail::DenseSetEmpty,ValueInfoT,llvm::detail::DenseSetPair<ValueT>>,ValueInfoT>::Iterator' (or there is no acceptable conversion) with [ ValueT=const llvm::Record *, ValueInfoT=llvm::DenseMapInfo<const llvm:...
2008 Jun 05
4
[LLVMdev] Adding DenseMap::FindAndConstruct with a default value
Hi All, I've been fiddling around with a DenseMap to store cached copies of some result. In short, I'm doing the following: It = Map.find(Key) if (It != Map.end() && It->second != Unknown) Return It->second; // do_stuff return Map[Key] = Result; However, I this requires two lookups in the hash table, which is not so nice. Cu...
2019 Sep 27
2
DenseMap/ValueMap: is M[New]=M[Old] valid ?
...You'd have to separate them for correctness if "NewKey" might not > already be in "M". > > On Thu, Sep 26, 2019 at 2:48 PM Jeroen Dobbelaere via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > Hi, > > I have a question about llvm/ADT/DenseMap.h and > llvm/IR/ValueMap.h: > > When you have a: >      MapType M; > > is it safe to do: >     M[NewKey] = M[OldKey]; > > or do you need to do it in two steps: >    auto tmp = M[OldKey]; // ensure the reference to M[OldKey] is...
2012 Oct 26
2
[LLVMdev] changes to raw_fd_ostream
...... fout<<"Hello World, how are you!"\n"; and it'll write out to the file, "Hello Wor" and then seg fault without assert. Sadly, this only happens for certain C code, any idea why this might be occuring? Also, during build I get a lot of these warnings:llvm/ADT/DenseMap.h: In copy constructor ‘llvm::DenseMap<KeyT, ValueT, KeyInfoT>::DenseMap(const llvm::DenseMap<KeyT, ValueT, KeyInfoT>&) [with KeyT = unsigned int, ValueT = llvm::PointerAlignElem, KeyInfoT = llvm::DenseMapInfo<unsigned int>]’: I'm guessing I messed up when updating someho...
2009 Nov 03
2
[LLVMdev] DenseMap iterator constness fix
Dear all, The first of the proposed patches (DenseMapIterator.patch) forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed a...
2016 Mar 15
2
RFC: DenseMap grow() slowness
> On Mar 15, 2016, at 4:09 PM, Philip Reames <listmail at philipreames.com> wrote: > > > > On 03/15/2016 03:07 PM, via llvm-dev wrote: >> There’s a few passes in LLVM that make heavy use of a big DenseMap, one that potentially gets filled with up to 1 entry for each instruction in the function. EarlyCSE is the best example, but Reassociate and MachineCSE have this to some degree as well (there might be others?). To put it simply: at least in my profile, EarlyCSE spends ~1/5 of its time growing Dense...
2007 Sep 05
2
[LLVMdev] Seeing a crash with ConstantFP::get
...C++ Fibonacci.exe!llvm::APFloat::zeroSignificand() Line 387 + 0x15 bytes C++ Fibonacci.exe!llvm::APFloat::APFloat(const llvm::fltSemantics & ourSemantics={...}, unsigned __int64 value=1) Line 307 C++ Fibonacci.exe!`anonymous namespace'::DenseMapAPFloatKeyInfo::getEmptyKey() Line 277 + 0x11 bytes C++ Fibonacci.exe!llvm::DenseMap<`anonymous namespace'::DenseMapAPFloatKeyInfo::KeyTy,llvm::ConstantFP *,A0x5b1fa632::DenseMapAPFloatKeyInfo>::getEmptyKey() Line 236 + 0x9 bytes C++ Fibonacci.exe!llvm:...
2018 Jan 16
0
Running Scalar Evolution on Modules on an ad-hoc basis
...ugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". I: %0 = load i32, i32* getelementptr inbounds ([64 x i32], [64 x i32]* @__dfsan_arg_tls, i64 0, i64 2), !dbg !18 SCEV: Program received signal SIGSEGV, Segmentation fault. llvm::DenseMap<llvm::ScalarEvolution::SCEVCallbackVH, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Value*>, llvm::detail::DenseMapPair<llvm::ScalarEvolution::SCEVCallbackVH, llvm::SCEV const*> >::getBuckets (this=0x78) at /home/ebdavis/Documents/llvm-project/llvm/include/llvm/ADT/DenseMap.h:739 7...
2019 Jun 21
2
Purpose of Epoch Trackers
...race condition. I don't know which is the root cause of this error because the assertion not explicitly occurs in my code, it occurs in the library code which I'm using in my threads. Assertion I'm getting is this: Global Value is CRO: /home/preejackie/spicy/orcs/llvm/include/llvm/ADT/DenseMap.h:1242: bool llvm::DenseMapIterator<const llvm::Value *, llvm::StringMapEntry<llvm::Value *> *, llvm::DenseMapInfo<const llvm::Value *>, llvm::detail::DenseMapPair<const llvm::Value *, llvm::StringMapEntry<llvm::Value *> *>, false>::operator!=(const llvm::DenseMapItera...