<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm/lib/Support/StringMap.cpp, branch release-3.2</title>
<subtitle>Unofficial llvm GIT mirror used in EmbToolkit
</subtitle>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/'/>
<entry>
<title>Add some __builtin_expect magic to StringMap.</title>
<updated>2012-08-29T22:57:04+00:00</updated>
<author>
<name>Benjamin Kramer</name>
<email>benny.kra@googlemail.com</email>
</author>
<published>2012-08-29T22:57:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=e160c53fbef056a3f121eeebcb7074f780bfae52'/>
<id>e160c53fbef056a3f121eeebcb7074f780bfae52</id>
<content type='text'>
Tombstones and full hash collisions are rare, mark the "empty"
and "no collision" paths as likely. The bug in simplifycfg
that prevented the hints from being picked during selfhost
up was fixed recently :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162874 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tombstones and full hash collisions are rare, mark the "empty"
and "no collision" paths as likely. The bug in simplifycfg
that prevented the hints from being picked during selfhost
up was fixed recently :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162874 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix PR13148, an inf-loop in StringMap.</title>
<updated>2012-06-19T17:40:35+00:00</updated>
<author>
<name>Chandler Carruth</name>
<email>chandlerc@gmail.com</email>
</author>
<published>2012-06-19T17:40:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=2a79116940012acaad9cc70efef79d7359f27513'/>
<id>2a79116940012acaad9cc70efef79d7359f27513</id>
<content type='text'>
StringMap suffered from the same bug as DenseMap: when you explicitly
construct it with a small number of buckets, you can arrange for the
tombstone-based growth path to be followed when the number of buckets
was less than '8'. In that case, even with a full map, it would compare
'0' as not less than '0', and refuse to grow the table, leading to
inf-loops trying to find an empty bucket on the next insertion. The fix
is very simple: use '&lt;=' as the comparison. The same fix was applied to
DenseMap as well during its recent refactoring.

Thanks to Alex Bolz for the great report and test case. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158725 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
StringMap suffered from the same bug as DenseMap: when you explicitly
construct it with a small number of buckets, you can arrange for the
tombstone-based growth path to be followed when the number of buckets
was less than '8'. In that case, even with a full map, it would compare
'0' as not less than '0', and refuse to grow the table, leading to
inf-loops trying to find an empty bucket on the next insertion. The fix
is very simple: use '&lt;=' as the comparison. The same fix was applied to
DenseMap as well during its recent refactoring.

Thanks to Alex Bolz for the great report and test case. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158725 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch StringMap from an array of structures to a structure of arrays.</title>
<updated>2011-12-27T20:35:07+00:00</updated>
<author>
<name>Benjamin Kramer</name>
<email>benny.kra@googlemail.com</email>
</author>
<published>2011-12-27T20:35:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=c894b02ae037b5fdb38e42535539d5a0e49d6c41'/>
<id>c894b02ae037b5fdb38e42535539d5a0e49d6c41</id>
<content type='text'>
- -25% memory usage of the main table on x86_64 (was wasted in struct padding).
- no significant performance change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147294 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- -25% memory usage of the main table on x86_64 (was wasted in struct padding).
- no significant performance change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147294 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Reset StringMap's NumTombstones on clears and rehashes.</title>
<updated>2011-03-30T18:32:51+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2011-03-30T18:32:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=03ef44991768b803ed5b210877ce0d83bf16fd93'/>
<id>03ef44991768b803ed5b210877ce0d83bf16fd93</id>
<content type='text'>
StringMap was not properly updating NumTombstones after a clear or rehash.

This was not fatal until now because the table was growing faster than
NumTombstones could, but with the previous change of preventing infinite
growth of the table the invariant (NumItems + NumTombstones &lt;= NumBuckets)
stopped being observed, causing infinite loops in certain situations.

Patch by José Fonseca!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128567 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
StringMap was not properly updating NumTombstones after a clear or rehash.

This was not fatal until now because the table was growing faster than
NumTombstones could, but with the previous change of preventing infinite
growth of the table the invariant (NumItems + NumTombstones &lt;= NumBuckets)
stopped being observed, causing infinite loops in certain situations.

Patch by José Fonseca!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128567 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent infinite growth of SmallMap instances.</title>
<updated>2011-03-30T18:32:44+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2011-03-30T18:32:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=aea4fe2862ce17acc6ce943df589ee8d5eb05adf'/>
<id>aea4fe2862ce17acc6ce943df589ee8d5eb05adf</id>
<content type='text'>
Rehash but don't grow when full of tombstones.

Patch by José Fonseca!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128565 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rehash but don't grow when full of tombstones.

Patch by José Fonseca!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128565 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Change all self assignments X=X to (void)X, so that we can turn on a</title>
<updated>2010-12-23T00:58:24+00:00</updated>
<author>
<name>Jeffrey Yasskin</name>
<email>jyasskin@google.com</email>
</author>
<published>2010-12-23T00:58:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=8e68c3873549ca31533e2e3e40dda3a43cb79566'/>
<id>8e68c3873549ca31533e2e3e40dda3a43cb79566</id>
<content type='text'>
new gcc warning that complains on self-assignments and
self-initializations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122458 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
new gcc warning that complains on self-assignments and
self-initializations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122458 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Pass StringRef by value.</title>
<updated>2009-11-06T10:58:06+00:00</updated>
<author>
<name>Daniel Dunbar</name>
<email>daniel@zuster.org</email>
</author>
<published>2009-11-06T10:58:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=2928c83b010f7cfdb0f819199d806f6942a7d995'/>
<id>2928c83b010f7cfdb0f819199d806f6942a7d995</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Move StringMap's string has function into StringExtras.h</title>
<updated>2009-10-17T18:21:06+00:00</updated>
<author>
<name>Daniel Dunbar</name>
<email>daniel@zuster.org</email>
</author>
<published>2009-10-17T18:21:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=4dee7fd2c2cb3fabddf99a184abe41dbc0bd4085'/>
<id>4dee7fd2c2cb3fabddf99a184abe41dbc0bd4085</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84344 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84344 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert StringMap to using StringRef for its APIs.</title>
<updated>2009-07-23T18:17:34+00:00</updated>
<author>
<name>Daniel Dunbar</name>
<email>daniel@zuster.org</email>
</author>
<published>2009-07-23T18:17:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=6316fbcb04af00fe76b6526fab09f51484014b3e'/>
<id>6316fbcb04af00fe76b6526fab09f51484014b3e</id>
<content type='text'>
 - Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove attribution from file headers, per discussion on llvmdev.</title>
<updated>2007-12-29T20:36:04+00:00</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2007-12-29T20:36:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=4ee451de366474b9c228b4e5fa573795a715216d'/>
<id>4ee451de366474b9c228b4e5fa573795a715216d</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
