<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/YAMLTraits.cpp, branch users/nico/python-1</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>[YAML] fix output incorrect format for block scalar string (#132897)</title>
<updated>2025-03-26T18:16:27+00:00</updated>
<author>
<name>Congcong Cai</name>
<email>congcongcai0907@163.com</email>
</author>
<published>2025-03-26T18:16:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a80aad28123101539134c277c6904905016754ca'/>
<id>a80aad28123101539134c277c6904905016754ca</id>
<content type='text'>
After outputting block scalar string, the indent will be wrong.
This patch fixes Padding after block scalar string to ensure the correct
format of yaml.

The new added ut will fail in main.
```diff
@@ -3,4 +3,4 @@
     Just a block
     scalar doc
-scalar:          a
+  scalar:          a
 ...\n
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After outputting block scalar string, the indent will be wrong.
This patch fixes Padding after block scalar string to ensure the correct
format of yaml.

The new added ut will fail in main.
```diff
@@ -3,4 +3,4 @@
     Just a block
     scalar doc
-scalar:          a
+  scalar:          a
 ...\n
```</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][YAML] Add `IO::error()` (#123475)</title>
<updated>2025-01-23T11:56:51+00:00</updated>
<author>
<name>Vitaly Buka</name>
<email>vitalybuka@google.com</email>
</author>
<published>2025-01-23T11:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4f26edd5e9eb3b6cea19e15ca8fb2c8416b82fa8'/>
<id>4f26edd5e9eb3b6cea19e15ca8fb2c8416b82fa8</id>
<content type='text'>
For #123280</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For #123280</pre>
</div>
</content>
</entry>
<entry>
<title>[YAML] Fix incorrect dash output in nested sequences (#116488)</title>
<updated>2024-11-30T13:10:31+00:00</updated>
<author>
<name>NAKAMURA Takumi</name>
<email>geek4civic@gmail.com</email>
</author>
<published>2024-11-30T13:10:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=39209724e66a20080bdebc609a051dfa0eb6b49f'/>
<id>39209724e66a20080bdebc609a051dfa0eb6b49f</id>
<content type='text'>
Nested sequences could be defined but the YAML output was incorrect.
`Output::newLineCheck()` was not able to emit multiple dashes `- ` and
YAML parser sometimes didn't accept its output as the result.

This fixes for emitting corresponding dashes for consecutive
`inSeqFirstElement`, but suppresses emission to the top
`inSeqFirstElement`.

This also fixes for emitting flow elements onto nested sequences.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nested sequences could be defined but the YAML output was incorrect.
`Output::newLineCheck()` was not able to emit multiple dashes `- ` and
YAML parser sometimes didn't accept its output as the result.

This fixes for emitting corresponding dashes for consecutive
`inSeqFirstElement`, but suppresses emission to the top
`inSeqFirstElement`.

This also fixes for emitting flow elements onto nested sequences.</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Remove unused includes (NFC) (#116752)</title>
<updated>2024-11-20T14:51:43+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-20T14:51:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d44ea7186befe38eb2b3804b15cd1ee1777458ed'/>
<id>d44ea7186befe38eb2b3804b15cd1ee1777458ed</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Use StringRef::operator== instead of StringRef::equals (NFC) (#91042)</title>
<updated>2024-05-04T15:46:48+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-05-04T15:46:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7ee6288312e8cde8d2e8ee48f87bbab966a89247'/>
<id>7ee6288312e8cde8d2e8ee48f87bbab966a89247</id>
<content type='text'>
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.

- StringRef::operator== outnumbers StringRef::equals by a factor of 25
  under llvm/ in terms of their usage.

- The elimination of StringRef::equals brings StringRef closer to
  std::string_view, which has operator== but not equals.

- S == "foo" is more readable than S.equals("foo"), especially for
  !Long.Expression.equals("str") vs Long.Expression != "str".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.

- StringRef::operator== outnumbers StringRef::equals by a factor of 25
  under llvm/ in terms of their usage.

- The elimination of StringRef::equals brings StringRef closer to
  std::string_view, which has operator== but not equals.

- S == "foo" is more readable than S.equals("foo"), especially for
  !Long.Expression.equals("str") vs Long.Expression != "str".</pre>
</div>
</content>
</entry>
<entry>
<title>[Support][YamlTraits] Add quoting for keys in textual YAML representation (#88763)</title>
<updated>2024-04-29T13:37:42+00:00</updated>
<author>
<name>Jannik Silvanus</name>
<email>37809848+jasilvanus@users.noreply.github.com</email>
</author>
<published>2024-04-29T13:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5f9ae61dee0f6432c1dcc16b4412bb99803fa7d5'/>
<id>5f9ae61dee0f6432c1dcc16b4412bb99803fa7d5</id>
<content type='text'>
The support library contains helpers to parse and emit YAML documents.

In the textual YAML representation, some strings need to be quoted, e.g.
when containing unprintable characters.

We already have such quoting implemented for YAML values.

This patch applies the same quoting to YAML *keys*.

One affected case is output of control registers in AMDGPU Msgpack
metadata, which are printed in a format like this:

```
   0x2cca (SPI_SHADER_PGM_RSRC1_ES): 42
```

With this patch, the key is quoted:

```
   '0x2cca (SPI_SHADER_PGM_RSRC1_ES)': 42
```

Most test changes come from this pattern.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The support library contains helpers to parse and emit YAML documents.

In the textual YAML representation, some strings need to be quoted, e.g.
when containing unprintable characters.

We already have such quoting implemented for YAML values.

This patch applies the same quoting to YAML *keys*.

One affected case is output of control registers in AMDGPU Msgpack
metadata, which are printed in a format like this:

```
   0x2cca (SPI_SHADER_PGM_RSRC1_ES): 42
```

With this patch, the key is quoted:

```
   '0x2cca (SPI_SHADER_PGM_RSRC1_ES)': 42
```

Most test changes come from this pattern.</pre>
</div>
</content>
</entry>
<entry>
<title>[YAMLTraits] Fix std::optional input on empty documents (#68947)</title>
<updated>2023-10-16T20:14:17+00:00</updated>
<author>
<name>akirchhoff-modular</name>
<email>github-work@kirchhoff.digital</email>
</author>
<published>2023-10-16T20:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4bf10f3da7ab32d70d5c7c43b7705c06c108d326'/>
<id>4bf10f3da7ab32d70d5c7c43b7705c06c108d326</id>
<content type='text'>
When the input document is non-empty, `mapOptional` works as expected,
setting `std::optional` to `std::nullopt` when the field is not present.
When the input document is empty, we hit a special case inside of
`Input::preflightKey` that results in `UseDefault = false`, which
results in the `std::optional` erroneously being set to a non-nullopt
value. `preflightKey` is changed to set `UseDefault = true` in this case
to make the behavior consistent between empty and non-empty documents.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the input document is non-empty, `mapOptional` works as expected,
setting `std::optional` to `std::nullopt` when the field is not present.
When the input document is empty, we hit a special case inside of
`Input::preflightKey` that results in `UseDefault = false`, which
results in the `std::optional` erroneously being set to a non-nullopt
value. `preflightKey` is changed to set `UseDefault = true` in this case
to make the behavior consistent between empty and non-empty documents.</pre>
</div>
</content>
</entry>
<entry>
<title>[YAML][NFC] Use BumpPtrAllocator instead of unique_ptrs</title>
<updated>2023-08-09T23:42:25+00:00</updated>
<author>
<name>Amir Ayupov</name>
<email>aaupov@fb.com</email>
</author>
<published>2023-08-09T22:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ec129c28af58d8200538184cab0ec659c437095d'/>
<id>ec129c28af58d8200538184cab0ec659c437095d</id>
<content type='text'>
Avoid both memory leaks and expensive dynamic allocations by using
SpecificBumpPtrAllocator for HNode types. It's expected they're not deallocated
until the `Input` class is destroyed, so deallocating all at once works well in
this case.

Reduces YAML profile pre-processing time in BOLT from
&gt;   11.2067 (  3.2%)   1.6487 (  7.3%)  12.8554 (  3.5%)  12.8635 (  5.6%)  pre-process profile data
to
&gt;   10.6613 (  3.1%)   1.6489 (  6.7%)  12.3102 (  3.3%)  12.3134 (  5.3%)  pre-process profile data

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D155006
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid both memory leaks and expensive dynamic allocations by using
SpecificBumpPtrAllocator for HNode types. It's expected they're not deallocated
until the `Input` class is destroyed, so deallocating all at once works well in
this case.

Reduces YAML profile pre-processing time in BOLT from
&gt;   11.2067 (  3.2%)   1.6487 (  7.3%)  12.8554 (  3.5%)  12.8635 (  5.6%)  pre-process profile data
to
&gt;   10.6613 (  3.1%)   1.6489 (  6.7%)  12.3102 (  3.3%)  12.3134 (  5.3%)  pre-process profile data

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D155006
</pre>
</div>
</content>
</entry>
<entry>
<title>[YAML][NFC] Replace if-else with switch in createHNodes</title>
<updated>2023-07-06T17:18:13+00:00</updated>
<author>
<name>Amir Ayupov</name>
<email>aaupov@fb.com</email>
</author>
<published>2023-07-06T17:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c2aa0616cdd2b64912e07da8894be3d37e43685d'/>
<id>c2aa0616cdd2b64912e07da8894be3d37e43685d</id>
<content type='text'>
BOLT YAML profile reading time gets marginally faster (14.1572-&gt;13.9207 s) for
a large YAML profile (121MB/31K functions). Not claiming stat significance
though.

Reviewed By: hintonda

Differential Revision: https://reviews.llvm.org/D154553
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BOLT YAML profile reading time gets marginally faster (14.1572-&gt;13.9207 s) for
a large YAML profile (121MB/31K functions). Not claiming stat significance
though.

Reviewed By: hintonda

Differential Revision: https://reviews.llvm.org/D154553
</pre>
</div>
</content>
</entry>
<entry>
<title>Recommit [YAML IO] Check that mapping doesn't contain duplicating keys</title>
<updated>2023-02-13T14:45:07+00:00</updated>
<author>
<name>Anton Sidorenko</name>
<email>anton.sidorenko@syntacore.com</email>
</author>
<published>2023-02-13T14:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=388d679c1dfa7c0cb5c9ee6cd0b8592c3c3d09ef'/>
<id>388d679c1dfa7c0cb5c9ee6cd0b8592c3c3d09ef</id>
<content type='text'>
The revert reason is fixed in D143727 (test changes).

According to YAML specification keys must be unique for a mapping node:
"The content of a mapping node is an unordered set of key/value node pairs, with
the restriction that each of the keys is unique".

Differential Revision: https://reviews.llvm.org/D140474
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The revert reason is fixed in D143727 (test changes).

According to YAML specification keys must be unique for a mapping node:
"The content of a mapping node is an unordered set of key/value node pairs, with
the restriction that each of the keys is unique".

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