<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/SmallVector.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[ADT] Declare replaceAllocation in SmallVector.cpp (NFC) (#107469)</title>
<updated>2024-09-05T22:47:28+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-09-05T22:47:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=169d453429ca9015046b42719ff5d13cda5d2c6f'/>
<id>169d453429ca9015046b42719ff5d13cda5d2c6f</id>
<content type='text'>
This patch changes replaceAllocation to a static function while moving
the declaration to SmallVector.cpp.  Note that:

- replaceAllocation is used only within SmallVector.cpp.
- replaceAllocation doesn't access any class members.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes replaceAllocation to a static function while moving
the declaration to SmallVector.cpp.  Note that:

- replaceAllocation is used only within SmallVector.cpp.
- replaceAllocation doesn't access any class members.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[ADT] Always use 32-bit size type for SmallVector with 16-bit elements" (#96826)</title>
<updated>2024-06-26T22:24:51+00:00</updated>
<author>
<name>Chelsea Cassanova</name>
<email>chelsea_cassanova@apple.com</email>
</author>
<published>2024-06-26T22:24:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1abe22cab521b833a9aa62a7a8d44ae188ab107e'/>
<id>1abe22cab521b833a9aa62a7a8d44ae188ab107e</id>
<content type='text'>
Reverts llvm/llvm-project#95536, this is breaking macOS GreenDragon
buildbots on arm64 and x86_64
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/6522/console,
also breaks the Darwin LLVM buildbots:
https://lab.llvm.org/buildbot/#/builders/23/builds/398</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#95536, this is breaking macOS GreenDragon
buildbots on arm64 and x86_64
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/6522/console,
also breaks the Darwin LLVM buildbots:
https://lab.llvm.org/buildbot/#/builders/23/builds/398</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT] Always use 32-bit size type for SmallVector with 16-bit elements (#95536)</title>
<updated>2024-06-26T20:48:38+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2024-06-26T20:48:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2582d11f1a8a5783828156d3ced354727f422885'/>
<id>2582d11f1a8a5783828156d3ced354727f422885</id>
<content type='text'>
`SmallVector` has a special case to allow vector of char to exceed 4 GB
in
size on 64-bit hosts. Apply this special case only for 8-bit element
types, instead of all element types &lt; 32 bits.

This makes `SmallVector&lt;MCPhysReg&gt;` more compact because `MCPhysReg` is
`uint16_t`.

---------

Co-authored-by: Nikita Popov &lt;github@npopov.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`SmallVector` has a special case to allow vector of char to exceed 4 GB
in
size on 64-bit hosts. Apply this special case only for 8-bit element
types, instead of all element types &lt; 32 bits.

This makes `SmallVector&lt;MCPhysReg&gt;` more compact because `MCPhysReg` is
`uint16_t`.

---------

Co-authored-by: Nikita Popov &lt;github@npopov.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM][ADT] Explicitly convert size_t values to SmallVector's size type (#77939)</title>
<updated>2024-01-22T08:39:11+00:00</updated>
<author>
<name>Andrei Golubev</name>
<email>andrey.golubev@intel.com</email>
</author>
<published>2024-01-22T08:39:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5fb39efe680642c6cab072560efa3bfce6646fb0'/>
<id>5fb39efe680642c6cab072560efa3bfce6646fb0</id>
<content type='text'>
Multiple places rely on implicit conversion when assigning 'size_t'
values to the member fields (size or capacity) of SmallVector.

Depending on the platform / compiler configuration, this may result in
narrowing conversion warnings (especially given that the size type of
SmallVector's member fields is determined based on type T - in
SmallVector&lt;T&gt;). To avoid the problem altogether, make the conversions
explicit.

Co-authored-by: Orest Chura &lt;orest.chura@intel.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Multiple places rely on implicit conversion when assigning 'size_t'
values to the member fields (size or capacity) of SmallVector.

Depending on the platform / compiler configuration, this may result in
narrowing conversion warnings (especially given that the size type of
SmallVector's member fields is determined based on type T - in
SmallVector&lt;T&gt;). To avoid the problem altogether, make the conversions
explicit.

Co-authored-by: Orest Chura &lt;orest.chura@intel.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[SmallVector] Reallocate if assigned memory is right after the current vector, created with capacity 0</title>
<updated>2022-10-06T22:37:43+00:00</updated>
<author>
<name>Alina Sbirlea</name>
<email>asbirlea@google.com</email>
</author>
<published>2022-08-23T22:39:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0fbeca0ee6f0cdc37b89e5b06fbb3ca6caf26f66'/>
<id>0fbeca0ee6f0cdc37b89e5b06fbb3ca6caf26f66</id>
<content type='text'>
Potential solution for
https://github.com/llvm/llvm-project/issues/57324.

Differential Revision: https://reviews.llvm.org/D132512
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Potential solution for
https://github.com/llvm/llvm-project/issues/57324.

Differential Revision: https://reviews.llvm.org/D132512
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Use std::clamp (NFC)</title>
<updated>2022-08-28T04:21:08+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2022-08-28T04:21:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=472e1a065d6f673290bdf393b412be5e4fa565c0'/>
<id>472e1a065d6f673290bdf393b412be5e4fa565c0</id>
<content type='text'>
We can safely use std::clamp here because the call to
report_size_overflow a few lines above guarantees MinSize &lt;= MaxSize.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can safely use std::clamp here because the call to
report_size_overflow a few lines above guarantees MinSize &lt;= MaxSize.
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Cleanup header dependencies in ADT and Support</title>
<updated>2022-01-21T12:54:49+00:00</updated>
<author>
<name>serge-sans-paille</name>
<email>sguelton@redhat.com</email>
</author>
<published>2022-01-20T11:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75e164f61d391979b4829bf2746a5d74b94e95f2'/>
<id>75e164f61d391979b4829bf2746a5d74b94e95f2</id>
<content type='text'>
The cleanup was manual, but assisted by "include-what-you-use". It consists in

1. Removing unused forward declaration. No impact expected.
2. Removing unused headers in .cpp files. No impact expected.
3. Removing unused headers in .h files. This removes implicit dependencies and
   is generally considered a good thing, but this may break downstream builds.
   I've updated llvm, clang, lld, lldb and mlir deps, and included a list of the
   modification in the second part of the commit.
4. Replacing header inclusion by forward declaration. This has the same impact
   as 3.

Notable changes:

- llvm/Support/TargetParser.h no longer includes llvm/Support/AArch64TargetParser.h nor llvm/Support/ARMTargetParser.h
- llvm/Support/TypeSize.h no longer includes llvm/Support/WithColor.h
- llvm/Support/YAMLTraits.h no longer includes llvm/Support/Regex.h
- llvm/ADT/SmallVector.h no longer includes llvm/Support/MemAlloc.h nor llvm/Support/ErrorHandling.h

You may need to add some of these headers in your compilation units, if needs be.

As an hint to the impact of the cleanup, running

clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before: 8000919 lines
after:  7917500 lines

Reduced dependencies also helps incremental rebuilds and is more ccache
friendly, something not shown by the above metric :-)

Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The cleanup was manual, but assisted by "include-what-you-use". It consists in

1. Removing unused forward declaration. No impact expected.
2. Removing unused headers in .cpp files. No impact expected.
3. Removing unused headers in .h files. This removes implicit dependencies and
   is generally considered a good thing, but this may break downstream builds.
   I've updated llvm, clang, lld, lldb and mlir deps, and included a list of the
   modification in the second part of the commit.
4. Replacing header inclusion by forward declaration. This has the same impact
   as 3.

Notable changes:

- llvm/Support/TargetParser.h no longer includes llvm/Support/AArch64TargetParser.h nor llvm/Support/ARMTargetParser.h
- llvm/Support/TypeSize.h no longer includes llvm/Support/WithColor.h
- llvm/Support/YAMLTraits.h no longer includes llvm/Support/Regex.h
- llvm/ADT/SmallVector.h no longer includes llvm/Support/MemAlloc.h nor llvm/Support/ErrorHandling.h

You may need to add some of these headers in your compilation units, if needs be.

As an hint to the impact of the cleanup, running

clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before: 8000919 lines
after:  7917500 lines

Reduced dependencies also helps incremental rebuilds and is more ccache
friendly, something not shown by the above metric :-)

Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Update SmallVector report_fatal_error calls to use Twine and add missing implicit header dependency.</title>
<updated>2021-10-05T16:03:19+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2021-10-05T16:02:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d67935ed8e78e7ffef17b6f7193b4f11f52a143d'/>
<id>d67935ed8e78e7ffef17b6f7193b4f11f52a143d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[AIX] Suppress -Waix-compat warning with SmallVector class</title>
<updated>2021-08-30T14:59:47+00:00</updated>
<author>
<name>Jake Egan</name>
<email>Jake.Egan@ibm.com</email>
</author>
<published>2021-08-30T14:42:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=57b46056b9435b52028fd96bed43f562be1705fd'/>
<id>57b46056b9435b52028fd96bed43f562be1705fd</id>
<content type='text'>
When building LLVM with Open XL and -Werror is specified, the -Waix-compat warning becomes an error. This patch updates the SmallVector class to suppress the -Waix-compat warning/error on AIX.

Reviewed By: daltenty

Differential Revision: https://reviews.llvm.org/D108577
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building LLVM with Open XL and -Werror is specified, the -Waix-compat warning becomes an error. This patch updates the SmallVector class to suppress the -Waix-compat warning/error on AIX.

Reviewed By: daltenty

Differential Revision: https://reviews.llvm.org/D108577
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Replace LLVM_ATTRIBUTE_NORETURN with C++11 [[noreturn]]</title>
<updated>2021-07-28T16:31:14+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2021-07-28T16:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6da3d8b19c32c76bb503b1a71fc167a0487ef200'/>
<id>6da3d8b19c32c76bb503b1a71fc167a0487ef200</id>
<content type='text'>
[[noreturn]] can be used since Oct 2016 when the minimum compiler requirement was bumped to GCC 4.8/MSVC 2015.

Note: the definition of LLVM_ATTRIBUTE_NORETURN is kept for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[[noreturn]] can be used since Oct 2016 when the minimum compiler requirement was bumped to GCC 4.8/MSVC 2015.

Note: the definition of LLVM_ATTRIBUTE_NORETURN is kept for now.
</pre>
</div>
</content>
</entry>
</feed>
