search for: densemaps

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

Did you mean: 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;
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 { >
2018 Jul 25
2
are the LLD libraries thread safe?
E.g. Is it intended to be allowed 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,
2018 Jul 25
2
are the LLD libraries thread safe?
Hi Andrew, LLD relies on various bits of global state which are manipulated during the link, so I wouldn't expect it to be thread safe at that level, although it does attempt to reset that global state at the start of each call to link(), so it should be callable sequentially. Regards, James On 25 July 2018 at 02:37, Andrew Kelley via llvm-dev < llvm-dev at lists.llvm.org> wrote:
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
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 special way I must make to enable asserts? Thanks,
2016 Mar 15
2
RFC: DenseMap grow() slowness
...seMap, 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 DenseMaps. This is kind of… bad. > > grow() is inherently slow because it needs to rehash and reinsert everything. This means growing a DenseMap costs much, much more than growing, for example, a vector. I talked about this with a few people and here are some possibilities we’ve come up with to improv...
2016 Mar 15
7
RFC: DenseMap grow() slowness
...seMap, 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 DenseMaps. This is kind of… bad. grow() is inherently slow because it needs to rehash and reinsert everything. This means growing a DenseMap costs much, much more than growing, for example, a vector. I talked about this with a few people and here are some possibilities we’ve come up with to improve this (so...
2019 Sep 27
3
DenseMap/ValueMap: is M[New]=M[Old] valid ?
On Thu, 26 Sep 2019, David Blaikie wrote: > I'd be surprised if Clang or GCC's behavior here varied depending on the > size of anything, but maybe? > > In any case, C++17 or so requires the RHS to be evaluated before the LHS for > assignments - so this is now /always/ wrong, not just unspecified (which, I > guess, also always wrong... just sometimes accidentally right)
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 grow...
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
2017 Apr 10
2
clang build failures using Visual Studio
Anyone run into this before? I'm trying to get a Windows native build using Visual Studio of LLVM, Clang, and LLD 4.0.0. So far LLVM built successfully, but I'm getting these cryptic error messages when building Clang: Microsoft (R) Build Engine version 15.1.1012.6693 Copyright (C) Microsoft Corporation. All rights reserved. ClangDiagnosticsEmitter.cpp c:\program files
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. Currently, there is no way to write this down so
2019 Sep 27
2
DenseMap/ValueMap: is M[New]=M[Old] valid ?
I actually ran into an elusive bug with this exact same issue some time ago as well, see https://bugs.llvm.org/show_bug.cgi?id=42065 and https://reviews.llvm.org/D62624. The strange thing about that bug was that it only showed up if built with GCC; Clang dereferenced the right hand side reference before evaluating the left hand side, as long as the value type was as small as the reference
2012 Oct 26
2
[LLVMdev] changes to raw_fd_ostream
I'm getting seemingly odd SegFaults when writing out using a raw_fd_ostream in the current trunk (last version worked, believe it was 153818, or similar). Again, nothing in the release notes... should I be scanning the svn log? For example, I have something like: raw_fd_ostream fout("out.txt", errorStr=""); .... fout<<"Hello World, how are you!"\n";
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 and the template parameter IsConst which
2016 Mar 15
2
RFC: DenseMap grow() slowness
...seMap, 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 DenseMaps. This is kind of… bad. >> >> grow() is inherently slow because it needs to rehash and reinsert everything. This means growing a DenseMap costs much, much more than growing, for example, a vector. I talked about this with a few people and here are some possibilities we’ve come up with t...
2007 Sep 05
2
[LLVMdev] Seeing a crash with ConstantFP::get
Hola LLVMers, I'm getting a crash when using ConstantFP::get. I can repro it by adding one line to the Fibonacci example program: int main(int argc, char **argv) { int n = argc > 1 ? atol(argv[1]) : 24; // Create some module to put our function into it. Module *M = new Module("test"); // We are about to create the "fib" function: Function
2018 Jan 16
0
Running Scalar Evolution on Modules on an ad-hoc basis
Hello! I am attempting to write a program which can analyze multiple llvm modules. Specifically, I want to use scalar evolution on different modules while being able to refer to the results across all modules thus processed. Ideally I don't want to do it as an LTO pass -- I don't know which modules I need to check at the time the program starts running. My current attempt at
2019 Jun 21
2
Purpose of Epoch Trackers
Hi all, I'm dealing with the multi-threaded code, in one of executions of the program I hitting an assertion failure, I'm not always getting the assertion failure when I run the executable but it occurs for say (1 in 10) times. I think there may be an thread race condition. I don't know which is the root cause of this error because the assertion not explicitly occurs in my code, it