<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/utils/FileCheck/FileCheck.cpp, branch users/nico/python-2</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>[llvm][utils] Avoid 'raw_string_ostream::str()' (NFC) (#97160)</title>
<updated>2024-06-29T22:50:52+00:00</updated>
<author>
<name>Youngsuk Kim</name>
<email>joseph942010@gmail.com</email>
</author>
<published>2024-06-29T22:50:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=caf26b9437ae3e26d4c9c8680d3e755aafeda6ed'/>
<id>caf26b9437ae3e26d4c9c8680d3e755aafeda6ed</id>
<content type='text'>
Since `raw_string_ostream` doesn't own the string buffer, it is
desirable (in terms of memory safety) for users to directly reference
the string buffer rather than use `raw_string_ostream::str()`.

Work towards TODO comment to remove `raw_string_ostream::str()`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since `raw_string_ostream` doesn't own the string buffer, it is
desirable (in terms of memory safety) for users to directly reference
the string buffer rather than use `raw_string_ostream::str()`.

Work towards TODO comment to remove `raw_string_ostream::str()`.</pre>
</div>
</content>
</entry>
<entry>
<title>Add llvm::min/max_element and use it in llvm/ and mlir/ directories. (#84678)</title>
<updated>2024-03-11T03:00:13+00:00</updated>
<author>
<name>Justin Lebar</name>
<email>justin.lebar@gmail.com</email>
</author>
<published>2024-03-11T03:00:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fab2bb8bfda865bd438dee981d7be7df8017b76d'/>
<id>fab2bb8bfda865bd438dee981d7be7df8017b76d</id>
<content type='text'>
For some reason this was missing from STLExtras.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For some reason this was missing from STLExtras.</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Don't use regex to find prefixes (#72237)</title>
<updated>2023-11-15T08:34:52+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2023-11-15T08:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=261b471015ef674253f03a4ae213919d983e016e'/>
<id>261b471015ef674253f03a4ae213919d983e016e</id>
<content type='text'>
FileCheck currently compiles a regular expression of the form
`Prefix1|Prefix2|...` and uses it to find the next prefix in the input.

If we had a fast regex implementation, this would be a useful thing to
do, as the regex implementation would be able to match multiple prefixes
more efficiently than a naive approach. However, with our actual regex
implementation, finding the prefixes basically becomes O(InputLen *
RegexLen * LargeConstantFactor), which is a lot worse than a simple
string search.

Replace the regex with StringRef::find(), and keeping track of the next
position of each prefix. There are various ways this could be improved
on, but it's already significantly faster that the previous approach.

For me, this improves check-llvm time from 138.5s to 132.5s, so by
around 4-5%.

For vector-interleaved-load-i16-stride-7.ll in particular, test time
drops from 5s to 2.5s.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FileCheck currently compiles a regular expression of the form
`Prefix1|Prefix2|...` and uses it to find the next prefix in the input.

If we had a fast regex implementation, this would be a useful thing to
do, as the regex implementation would be able to match multiple prefixes
more efficiently than a naive approach. However, with our actual regex
implementation, finding the prefixes basically becomes O(InputLen *
RegexLen * LargeConstantFactor), which is a lot worse than a simple
string search.

Replace the regex with StringRef::find(), and keeping track of the next
position of each prefix. There are various ways this could be improved
on, but it's already significantly faster that the previous approach.

For me, this improves check-llvm time from 138.5s to 132.5s, so by
around 4-5%.

For vector-interleaved-load-i16-stride-7.ll in particular, test time
drops from 5s to 2.5s.</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Fix performance-for-range-copy issues. NFC</title>
<updated>2023-09-27T20:34:41+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2023-09-27T20:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab3e647b893e1063838a7aff5477c53338992558'/>
<id>ab3e647b893e1063838a7aff5477c53338992558</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC</title>
<updated>2022-06-04T04:59:05+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2022-06-04T04:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=557efc9a8b68628c2c944678c6471dac30ed9e8e'/>
<id>557efc9a8b68628c2c944678c6471dac30ed9e8e</id>
<content type='text'>
Some cl::ZeroOrMore were added to avoid the `may only occur zero or one times!`
error. More were added due to cargo cult. Since the error has been removed,
cl::ZeroOrMore is unneeded.

Also remove cl::init(false) while touching the lines.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some cl::ZeroOrMore were added to avoid the `may only occur zero or one times!`
error. More were added due to cargo cult. Since the error has been removed,
cl::ZeroOrMore is unneeded.

Also remove cl::init(false) while touching the lines.
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] GetCheckTypeAbbreviation() to handle the misspelled case.</title>
<updated>2022-05-26T11:20:15+00:00</updated>
<author>
<name>Ivan Kosarev</name>
<email>ivan.kosarev@amd.com</email>
</author>
<published>2022-05-26T11:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8894c05b0d351f998b1836542ba791247394bd12'/>
<id>8894c05b0d351f998b1836542ba791247394bd12</id>
<content type='text'>
Also fix directives not covered by D125604.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also fix directives not covered by D125604.
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup includes: DebugInfo &amp; CodeGen</title>
<updated>2022-03-12T16:26:40+00:00</updated>
<author>
<name>serge-sans-paille</name>
<email>sguelton@redhat.com</email>
</author>
<published>2022-03-09T21:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed98c1b37661b0795a5e34517941485f0f0688d1'/>
<id>ed98c1b37661b0795a5e34517941485f0f0688d1</id>
<content type='text'>
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121332
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121332
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Fix initialized but never used static analyzer warning. NFC.</title>
<updated>2022-02-10T21:03:45+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2022-02-10T21:03:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1211c41805f040f33ae5117aa6eb596aef7141e7'/>
<id>1211c41805f040f33ae5117aa6eb596aef7141e7</id>
<content type='text'>
Remove superfluous variable initialization, the variable is assigned by both paths immediately afterward.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove superfluous variable initialization, the variable is assigned by both paths immediately afterward.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Remove some no-op raw_string_ostream flush calls, NFC</title>
<updated>2021-12-10T19:26:08+00:00</updated>
<author>
<name>Duncan P. N. Exon Smith</name>
<email>dexonsmith@apple.com</email>
</author>
<published>2021-12-10T02:57:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dcd6162b7fd5108a5fbf2fb29d870cb4255eb9c7'/>
<id>dcd6162b7fd5108a5fbf2fb29d870cb4255eb9c7</id>
<content type='text'>
Since 65b13610a5226b84889b923bae884ba395ad084d, raw_string_ostream has
been unbuffered by default. Based on an audit of llvm/utils/, this
commit removes every call to `raw_string_ostream::flush()` and any call
to `raw_string_ostream::str()` whose result is ignored or that doesn't
help with clarity.

I left behind a few calls to `str()`. In these cases, the underlying
std::string was declared pretty far away and never used again, whereas
stream recently had its last write. The code is easier to read as-is;
the no-op call to `flush()` inside `str()` isn't harmful, and when
https://reviews.llvm.org/D115421 lands it'll be gone anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since 65b13610a5226b84889b923bae884ba395ad084d, raw_string_ostream has
been unbuffered by default. Based on an audit of llvm/utils/, this
commit removes every call to `raw_string_ostream::flush()` and any call
to `raw_string_ostream::str()` whose result is ignored or that doesn't
help with clarity.

I left behind a few calls to `str()`. In these cases, the underlying
std::string was declared pretty far away and never used again, whereas
stream recently had its last write. The code is easier to read as-is;
the no-op call to `flush()` inside `str()` isn't harmful, and when
https://reviews.llvm.org/D115421 lands it'll be gone anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Try to fix buildbot failures caused by c7c542e8f306</title>
<updated>2021-03-27T15:03:10+00:00</updated>
<author>
<name>Joel E. Denny</name>
<email>jdenny.ornl@gmail.com</email>
</author>
<published>2021-03-27T15:03:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=43279d1df90cdd833b473ec7d9b623c45d2ccfcc'/>
<id>43279d1df90cdd833b473ec7d9b623c45d2ccfcc</id>
<content type='text'>
For example,

&lt;https://lab.llvm.org/buildbot/#/builders/132/builds/3929&gt;

has this diagnostic:

```
/opt/gcc/9.3.0/snos/include/g++/bits/stl_tree.h:780:8: error: static assertion failed: comparison object must be invocable as const
  780 |        is_invocable_v&lt;const _Compare&amp;, const _Key&amp;, const _Key&amp;&gt;,
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For example,

&lt;https://lab.llvm.org/buildbot/#/builders/132/builds/3929&gt;

has this diagnostic:

```
/opt/gcc/9.3.0/snos/include/g++/bits/stl_tree.h:780:8: error: static assertion failed: comparison object must be invocable as const
  780 |        is_invocable_v&lt;const _Compare&amp;, const _Key&amp;, const _Key&amp;&gt;,
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
</pre>
</div>
</content>
</entry>
</feed>
