search for: gethashvalue

Displaying 12 results from an estimated 12 matches for "gethashvalue".

Did you mean: getbasevalue
2009 Mar 11
4
[LLVMdev] a different hash for APInts
...0xfffee000}, {0xffff0000}, {0xffff2000}, {0xffff4000}, {0xffff6000}, {0xffff8000}, {0xffffa000}, {0xffffc000}, {0xffffe000}, }; The module has over 16K lines, so that's about 64K entries (1<<16). There is no executable code in this testcase. The cause seems to be the APInt::getHashValue() function (near line 626 of .../lib/Support/APInt.cpp). Some investigation using the debugger suggests that every value was hashing into about three buckets, and the DenseMap code was looping excessively over the extremely long chains in those three buckets. Since I'm not an expert o...
2009 Mar 12
0
[LLVMdev] a different hash for APInts
...{0xffff2000}, {0xffff4000}, {0xffff6000}, > {0xffff8000}, {0xffffa000}, {0xffffc000}, {0xffffe000}, > }; > > The module has over 16K lines, so that's about 64K entries (1<<16). > There is no executable code in this testcase. > > The cause seems to be the APInt::getHashValue() function (near line > 626 of .../lib/Support/APInt.cpp). Some investigation using the > debugger suggests that every value was hashing into about three > buckets, and the DenseMap code was looping excessively over the > extremely long chains in those three buckets. > From wh...
2009 Apr 01
1
[LLVMdev] Patches: Range insertion for DenseSet; definition of DenseMapInfo<char>
...p.h (working copy) @@ -51,6 +51,17 @@ static bool isPod() { return true; } }; +// Provide DenseMapInfo for chars. +template<> struct DenseMapInfo<char> { + static inline char getEmptyKey() { return ~0; } + static inline char getTombstoneKey() { return ~0 - 1; } + static unsigned getHashValue(const char& Val) { return Val * 37; } + static bool isPod() { return true; } + static bool isEqual(const char& LHS, const char& RHS) { + return LHS == RHS; + } +}; + // Provide DenseMapInfo for unsigned ints. template<> struct DenseMapInfo<unsigned> { static inline...
2014 Oct 17
3
[LLVMdev] oprofile support?
...nux 2 3.0303 ld-2.19.so _dl_lookup_symbol_x 2 3.0303 libLLVMCore.so llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*> >, void const*, llvm::PassInfo const*, llvm::DenseMapInfo<void const*> >::getHashValue(void const* const&) 2 3.0303 libLLVMCore.so std::vector<llvm::PassInfo const*, std::allocator<llvm::PassInfo const*> >::begin() const 1 1.5152 ld-2.19.so _dl_check_map_versions 1 1.5152 ld-2.19.so _dl_fixup 1 1...
2014 Nov 29
2
[LLVMdev] oprofile support?
...ld-2.19.so _dl_lookup_symbol_x > 2 3.0303 libLLVMCore.so > llvm::DenseMapBase<llvm::DenseMap<void const*, llvm::PassInfo const*, > llvm::DenseMapInfo<void const*> >, void const*, llvm::PassInfo const*, > llvm::DenseMapInfo<void const*> >::getHashValue(void const* const&) > 2 3.0303 libLLVMCore.so std::vector<llvm::PassInfo > const*, std::allocator<llvm::PassInfo const*> >::begin() const > 1 1.5152 ld-2.19.so _dl_check_map_versions > 1 1.5152 ld-2.19.so _...
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 { >
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;
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...; + if (LIds[i] != RIds[i]) > + return LIds[i] < RIds[i]; > + > + return LSize < RSize; > +} > + > +struct KeyInfo { > + static inline unsigned getEmptyKey() { return -1U; } > + static inline unsigned getTombstoneKey() { return -2U; } > + static unsigned getHashValue(const unsigned &Key) { return Key; } > + static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == > RHS; } > + static bool isPod() { return true; } > +}; > + > +/// ActionEntry - Structure describing an entry in the actions table. > +struct ActionEntry { > +...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...gt; + return LIds[i] < RIds[i]; >> + >> + return LSize < RSize; >> +} >> + >> +struct KeyInfo { >> + static inline unsigned getEmptyKey() { return -1U; } >> + static inline unsigned getTombstoneKey() { return -2U; } >> + static unsigned getHashValue(const unsigned &Key) { return Key; } >> + static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == >> RHS; } >> + static bool isPod() { return true; } >> +}; >> + >> +/// ActionEntry - Structure describing an entry in the actions table. >> +s...
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone, Here's a patch that enables exception handling when jitting. I've copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need to factorize it, but the functionality is there and I'm very happy with it :) lli should now be able to execute the output from llvm-gcc when using exceptions (the UnwindInst instruction is not involved in this patch). Just add the
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...; + if (LIds[i] != RIds[i]) > + return LIds[i] < RIds[i]; > + > + return LSize < RSize; > +} > + > +struct KeyInfo { > + static inline unsigned getEmptyKey() { return -1U; } > + static inline unsigned getTombstoneKey() { return -2U; } > + static unsigned getHashValue(const unsigned &Key) { return Key; } > + static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == > RHS; } > + static bool isPod() { return true; } > +}; > + > +/// ActionEntry - Structure describing an entry in the actions table. > +struct ActionEntry { > +...
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all, Here's a new patch with Evan's comments (thx Evan!) and some cleanups. Now the (duplicated) exception handling code is in a new file: lib/ExecutionEngine/JIT/JITDwarfEmitter. This patch should work on linux/x86 and linux/ppc (tested). Nicolas -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jit-exceptions.patch URL: