<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/unittests/ADT/StringExtrasTest.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>[ADT][bugfix] Fixed extra leading zero in uhextostr (#141097)</title>
<updated>2025-05-30T11:58:30+00:00</updated>
<author>
<name>Bushev Dmitry</name>
<email>111585886+dybv-sc@users.noreply.github.com</email>
</author>
<published>2025-05-30T11:58:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4f392f9d0d07c1e414452badf412d6c612f182c2'/>
<id>4f392f9d0d07c1e414452badf412d6c612f182c2</id>
<content type='text'>
fixed bug: if fixed-width mode uhextostr() is used with value zero, it
prints extra '0' character.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixed bug: if fixed-width mode uhextostr() is used with value zero, it
prints extra '0' character.</pre>
</div>
</content>
</entry>
<entry>
<title>[UnitTests] Fix APInt signed flags (NFC)</title>
<updated>2024-09-20T10:13:33+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-09-20T10:10:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=37e5319a12ba47c18049728804d3d1e1b10c4eb4'/>
<id>37e5319a12ba47c18049728804d3d1e1b10c4eb4</id>
<content type='text'>
This makes unit tests compatible with the assertion added in
https://github.com/llvm/llvm-project/pull/106524, by setting the
isSigned flag to the correct value or changing how the value is
constructed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes unit tests compatible with the assertion added in
https://github.com/llvm/llvm-project/pull/106524, by setting the
isSigned flag to the correct value or changing how the value is
constructed.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT] Add `isPunct` to StringExtras (#105461)</title>
<updated>2024-08-21T20:28:28+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2024-08-21T20:28:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b03b170dd39799b4fb25ffe70b81d0cf0c7d7346'/>
<id>b03b170dd39799b4fb25ffe70b81d0cf0c7d7346</id>
<content type='text'>
- Add `isPunct` to StringExtras.h.
- Add unit test for `isPunct` to StringExtrasTest.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add `isPunct` to StringExtras.h.
- Add unit test for `isPunct` to StringExtrasTest.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][Support] fix convertToSnakeFromCamelCase (#68375)</title>
<updated>2023-10-06T21:33:13+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2023-10-06T21:33:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=767dcc5f77b61a3363f7836661cc208a5bfd1c9c'/>
<id>767dcc5f77b61a3363f7836661cc208a5bfd1c9c</id>
<content type='text'>
Currently runs of caps aren't handled correctly so e.g. something like
`Intel_OCL_BI` is snake cased to `intel_o_c_l_b_i` (previously discussed
on this [phabricator
patch](https://reviews.llvm.org/rG92233062c17590d3157bdc6db430fcdfc54312fe)).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently runs of caps aren't handled correctly so e.g. something like
`Intel_OCL_BI` is snake cased to `intel_o_c_l_b_i` (previously discussed
on this [phabricator
patch](https://reviews.llvm.org/rG92233062c17590d3157bdc6db430fcdfc54312fe)).</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT] Add more ArrayRef &lt;-&gt; StringRef conversion functions</title>
<updated>2023-10-06T20:54:53+00:00</updated>
<author>
<name>Steven Wu</name>
<email>stevenwu@apple.com</email>
</author>
<published>2023-10-04T21:47:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4c94aff508eed06b8af43e2d61bd8a5e397927a8'/>
<id>4c94aff508eed06b8af43e2d61bd8a5e397927a8</id>
<content type='text'>
Add new functions in StringExtras to convert byte size type array to
StringRef and vice versa.

Reviewed By: benlangmuir, dexonsmith

Differential Revision: https://reviews.llvm.org/D139035
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new functions in StringExtras to convert byte size type array to
StringRef and vice versa.

Reviewed By: benlangmuir, dexonsmith

Differential Revision: https://reviews.llvm.org/D139035
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT] Fix llvm::join on containers of char*s (#67113)</title>
<updated>2023-09-28T12:45:02+00:00</updated>
<author>
<name>Sam McCall</name>
<email>sam.mccall@gmail.com</email>
</author>
<published>2023-09-28T12:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=898b961885c8589b9b75ac7daa083843d9d00f79'/>
<id>898b961885c8589b9b75ac7daa083843d9d00f79</id>
<content type='text'>
Currently it tries to call S.size() when preallocating the target
string,
which doesn't compile.
vector&lt;const char*&gt; is used a bunch in e.g. clang driver.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently it tries to call S.size() when preallocating the target
string,
which doesn't compile.
vector&lt;const char*&gt; is used a bunch in e.g. clang driver.</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT] [NFC] Introduce isLower and isUpper helpers.</title>
<updated>2023-08-01T19:24:32+00:00</updated>
<author>
<name>Jacek Caban</name>
<email>jacek@codeweavers.com</email>
</author>
<published>2023-08-01T12:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd5ca37413957cc36352ff3e7c02399288c74af2'/>
<id>fd5ca37413957cc36352ff3e7c02399288c74af2</id>
<content type='text'>
Reviewed By: MaskRay, jhenderson
Differential Revision: https://reviews.llvm.org/D156796
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed By: MaskRay, jhenderson
Differential Revision: https://reviews.llvm.org/D156796
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT] support fixed-width output with `utohexstr`</title>
<updated>2022-01-28T18:07:54+00:00</updated>
<author>
<name>Yuanfang Chen</name>
<email>yuanfang.chen@sony.com</email>
</author>
<published>2022-01-28T18:07:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a41c8b8fd5ade12b8f055634ab9faf69c7ba6765'/>
<id>a41c8b8fd5ade12b8f055634ab9faf69c7ba6765</id>
<content type='text'>
Will use it to output a hash value that needs fixed-width.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D118427
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Will use it to output a hash value that needs fixed-width.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D118427
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT] Simplifying hex string parsing so it runs faster in debug modes.</title>
<updated>2021-11-04T03:31:20+00:00</updated>
<author>
<name>Ben Vanik</name>
<email>benvanik@google.com</email>
</author>
<published>2021-11-04T03:30:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2fcffcd0e8e54f3c8c12fcfc58db4af47d5c4272'/>
<id>2fcffcd0e8e54f3c8c12fcfc58db4af47d5c4272</id>
<content type='text'>
This expands the lookup table statically and avoids routing through methods that
contain asserts (like StringRef/std::string element accessors and drop_front)
such that performance is more predictable across compilation environments. This
was primarily driven by slow debug mode performance but has a large benefit in
release builds as well.

```
ssd_mobilenet_v2_face_float (42MB .mlir)
  Debug/MSVC (old):  5.22s
  Debug/MSVC (new):  0.16s
Release/MSVC (old):  0.81s
Release/MSVC (new):  0.02s

huggingface_minilm (536MB .mlir)
  Debug/MSVC (old): 65.31s
  Debug/MSVC (new):  2.03s
Release/MSVC (old):  9.93s
Release/MSVC (new):  0.27s
```

Now in debug the time is split evenly between lexString, tryGetFromHex, and
element attrs hashing, with the next step to making it faster being to combine
the work (incremental hashing during conversion, etc) - but this is at least in
the right order of magnitude and retains the original API surface.

I have not profiled a build with clang but this is strictly less code and simpler
data structures so I'd expect improvements there as well.

This also fixes a bug where 0xFF bytes in the input would read out of bounds.

Reviewed By: dblaikie, stellaraccident

Differential Revision: https://reviews.llvm.org/D112105
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This expands the lookup table statically and avoids routing through methods that
contain asserts (like StringRef/std::string element accessors and drop_front)
such that performance is more predictable across compilation environments. This
was primarily driven by slow debug mode performance but has a large benefit in
release builds as well.

```
ssd_mobilenet_v2_face_float (42MB .mlir)
  Debug/MSVC (old):  5.22s
  Debug/MSVC (new):  0.16s
Release/MSVC (old):  0.81s
Release/MSVC (new):  0.02s

huggingface_minilm (536MB .mlir)
  Debug/MSVC (old): 65.31s
  Debug/MSVC (new):  2.03s
Release/MSVC (old):  9.93s
Release/MSVC (new):  0.27s
```

Now in debug the time is split evenly between lexString, tryGetFromHex, and
element attrs hashing, with the next step to making it faster being to combine
the work (incremental hashing during conversion, etc) - but this is at least in
the right order of magnitude and retains the original API surface.

I have not profiled a build with clang but this is strictly less code and simpler
data structures so I'd expect improvements there as well.

This also fixes a bug where 0xFF bytes in the input would read out of bounds.

Reviewed By: dblaikie, stellaraccident

Differential Revision: https://reviews.llvm.org/D112105
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] [ADT] Update llvm::Split() per Pavel Labath's suggestions</title>
<updated>2021-10-22T10:27:46+00:00</updated>
<author>
<name>Michał Górny</name>
<email>mgorny@moritz.systems</email>
</author>
<published>2021-09-27T10:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=66e06cc8cba3c39c760082a8ed469b5292f9ee67'/>
<id>66e06cc8cba3c39c760082a8ed469b5292f9ee67</id>
<content type='text'>
Optimize the iterator comparison logic to compare Current.data()
pointers.  Use std::tie for assignments from std::pair.  Replace
the custom class with a function returning iterator_range.

Differential Revision: https://reviews.llvm.org/D110535
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Optimize the iterator comparison logic to compare Current.data()
pointers.  Use std::tie for assignments from std::pair.  Replace
the custom class with a function returning iterator_range.

Differential Revision: https://reviews.llvm.org/D110535
</pre>
</div>
</content>
</entry>
</feed>
