Commit Graph

14 Commits

Author SHA1 Message Date
Lang Hames
558b52b517 [ORC] Change handling for SymbolStringPtr tombstones and empty keys.
SymbolStringPtr used to use nullptr as its empty value and (since it performed
ref-count operations on any non-nullptr) a pointer to a special pool-entry
instance as its tombstone.

This commit changes the scheme to use two invalid pointer values as the empty
and tombstone values, and broadens the ref-count guard to prevent ref-counting
operations from being performed on these pointers. This should improve the
performance of SymbolStringPtrs used in DenseMaps/DenseSets, as ref counting
operations will no longer be performed on the tombstone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360925 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-16 18:29:34 +00:00
Lang Hames
320e7fa62f [ORC] Use inline friend definitions for SymbolStringPtr operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360917 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-16 17:20:17 +00:00
Lang Hames
eedb14b431 [ORC] Modify DenseMap hashing for SymbolStringPtrs.
Modifies the DenseMapInfo<SymbolStringPtr>::getHashValue method to take its
argument by const-ref rather than by value (to avoid unnecessary ref-counting
operations) and to defer to DenseMapInfo<void*> for the hash value computation
(since SymbolStringPtrs are just pointers under the hood).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360831 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-16 00:21:10 +00:00
Chandler Carruth
6b547686c5 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 08:50:56 +00:00
Lang Hames
52ff03cff9 [ORC] Switch to DenseMap/DenseSet for ORC symbol map/set types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344565 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-15 22:27:02 +00:00
Adrian Prantl
0b24b74655 Remove @brief commands from doxygen comments, too.
This is a follow-up to r331272.

We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by
  for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done

https://reviews.llvm.org/D46290

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331275 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-01 16:10:38 +00:00
Lang Hames
eee57fe80c [ORC] Add a debugging check to catch dangling references to SymbolStringPools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329019 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-02 21:39:39 +00:00
Lang Hames
6880dba367 [ORC] Incorporate Dave Blaikie's feedback on r319839.
- Turn some member functions into free functions.
- Avoid a redundant map lookup
- Simplify a loop index

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322159 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-10 04:01:44 +00:00
Lang Hames
be7a10d44b [ORC] Fix the counter type on SymbolStringPool entries.
Hopefully this will fix the build failure in
http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/3417

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321926 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-06 05:19:06 +00:00
Lang Hames
7767d20a22 [ORC] Actually compare pointer values as advertised (rather than comparing ref
counts). Oops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321837 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-05 00:04:15 +00:00
Lang Hames
6f2842fb8b [ORC] Add dereference operator to SymbolStringPtr.
Dereference yields a StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321836 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-05 00:04:13 +00:00
Lang Hames
bbb0cb1b01 [ORC] Mark SymbolStringPool methods as inline to avoid linkage errors, add a
less-than comparison to SymbolStringPtr and a corresponding unit test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320116 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-07 23:32:11 +00:00
Lang Hames
8bedc46d5a [Orc] (Hopefully) Fix a missing typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319845 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 22:14:35 +00:00
Lang Hames
96cfeb3474 [Orc] Add a SymbolStringPool data structure for efficient storage and fast
comparison of symbol names.

SymbolStringPool is a thread-safe string pool that will be used in upcoming Orc
APIs to facilitate efficient storage and fast comparison of symbol name strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319839 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 21:44:56 +00:00