<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/TableGen, 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][TableGen][DecoderEmitter] Add wrapper struct for `bit_value_t` (#146248)</title>
<updated>2025-07-01T14:36:17+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-07-01T14:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d7b8b65e239f3daa08c767f899cbfd7ca2871a0d'/>
<id>d7b8b65e239f3daa08c767f899cbfd7ca2871a0d</id>
<content type='text'>
Add a convenience wrapper struct for the `bit_value_t` enum type to host
various constructors, query, and printing support. Also refactor related
code in several places. In `getBitsField`, use `llvm::append_range` and
`SmallVector::append()` and eliminate manual loops. Eliminate
`emitNameWithID` and instead use the `operator &lt;&lt;` that does the same
thing as this function. Have `BitValue::getValue()` (replacement for
`Value`) return std::optional&lt;&gt; instead of -1 for unset bits. Terminate
with a fatal error when a decoding conflict is encountered.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a convenience wrapper struct for the `bit_value_t` enum type to host
various constructors, query, and printing support. Also refactor related
code in several places. In `getBitsField`, use `llvm::append_range` and
`SmallVector::append()` and eliminate manual loops. Eliminate
`emitNameWithID` and instead use the `operator &lt;&lt;` that does the same
thing as this function. Have `BitValue::getValue()` (replacement for
`Value`) return std::optional&lt;&gt; instead of -1 for unset bits. Terminate
with a fatal error when a decoding conflict is encountered.</pre>
</div>
</content>
</entry>
<entry>
<title>TableGen: Generate enum for runtime libcall implementations (#144973)</title>
<updated>2025-06-27T08:40:43+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-06-27T08:40:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b88e1f6a79cbe2672dd6dbb926ae7ca02ce537a5'/>
<id>b88e1f6a79cbe2672dd6dbb926ae7ca02ce537a5</id>
<content type='text'>
Work towards separating the ABI existence of libcalls vs. the
lowering selection. Set libcall selection through enums, rather
than through raw string names.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work towards separating the ABI existence of libcalls vs. the
lowering selection. Set libcall selection through enums, rather
than through raw string names.</pre>
</div>
</content>
</entry>
<entry>
<title>TableGen: Add runtime libcall backend (#144972)</title>
<updated>2025-06-27T08:37:03+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-06-27T08:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3fdf46ad60f1747e8ea1cced2e67dd36f29fc43b'/>
<id>3fdf46ad60f1747e8ea1cced2e67dd36f29fc43b</id>
<content type='text'>
Replace RuntimeLibcalls.def with a tablegenerated version. This
is in preparation for splitting RuntimeLibcalls into two components.
For now match the existing functionality.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace RuntimeLibcalls.def with a tablegenerated version. This
is in preparation for splitting RuntimeLibcalls into two components.
For now match the existing functionality.</pre>
</div>
</content>
</entry>
<entry>
<title>[MC] Use StringTable to reduce dynamic relocations (#144202)</title>
<updated>2025-06-25T12:23:11+00:00</updated>
<author>
<name>Reid Kleckner</name>
<email>rnk@google.com</email>
</author>
<published>2025-06-25T12:23:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bb7242477c2f36195b53018b58a77f1dc12ffb06'/>
<id>bb7242477c2f36195b53018b58a77f1dc12ffb06</id>
<content type='text'>
Dynamic relocations are expensive on ELF/Linux platforms because they
are applied in userspace on process startup. Therefore, it is worth
optimizing them to make PIE and PIC dylib builds faster. In +asserts
builds (non-NDEBUG), nikic identified these schedule class name string
pointers as the leading source of dynamic relocations. [1]

This change uses llvm::StringTable and the StringToOffsetTable TableGen
helper to turn the string pointers into 32-bit offsets into a separate
character array.

The number of dynamic relocations is reduced by ~60%:
❯ llvm-readelf --dyn-relocations lib/libLLVM.so | wc -l
381376 # before
155156 # after

The test suite time is modestly affected, but I'm running on a shared
noisy workstation VM with a ton of cores:
https://gist.github.com/rnk/f38882c2fe2e63d0eb58b8fffeab69de
Testing Time: 100.88s   # before
Testing Time: 78.50s. # after
Testing Time: 96.25s.  # before again

I haven't used any fancy hyperfine/denoising tools, but I think the
result is clearly visible and we should ship it.

[1] https://gist.github.com/nikic/554f0a544ca15d5219788f1030f78c5a</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dynamic relocations are expensive on ELF/Linux platforms because they
are applied in userspace on process startup. Therefore, it is worth
optimizing them to make PIE and PIC dylib builds faster. In +asserts
builds (non-NDEBUG), nikic identified these schedule class name string
pointers as the leading source of dynamic relocations. [1]

This change uses llvm::StringTable and the StringToOffsetTable TableGen
helper to turn the string pointers into 32-bit offsets into a separate
character array.

The number of dynamic relocations is reduced by ~60%:
❯ llvm-readelf --dyn-relocations lib/libLLVM.so | wc -l
381376 # before
155156 # after

The test suite time is modestly affected, but I'm running on a shared
noisy workstation VM with a ton of cores:
https://gist.github.com/rnk/f38882c2fe2e63d0eb58b8fffeab69de
Testing Time: 100.88s   # before
Testing Time: 78.50s. # after
Testing Time: 96.25s.  # before again

I haven't used any fancy hyperfine/denoising tools, but I think the
result is clearly visible and we should ship it.

[1] https://gist.github.com/nikic/554f0a544ca15d5219788f1030f78c5a</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM][DecoderEmitter] Add option to use function table in decodeToMCInst (#144814)</title>
<updated>2025-06-25T01:49:05+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-06-25T01:49:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed5f8f238d68811ad5eabcdb0248bcd65ab81960'/>
<id>ed5f8f238d68811ad5eabcdb0248bcd65ab81960</id>
<content type='text'>
Add option `use-fn-table-in-decode-to-mcinst` to use a table of function
pointers instead of a switch case in the generated `decodeToMCInst`
function.

When the number of switch cases in this function is large, the generated
code takes a long time to compile in release builds. Using a table of
function pointers instead improves the compile time significantly (~3x
speedup in compiling the code in a downstream target). This option will
allow targets to opt into this mode if they desire for better build
times.

Tested with `check-llvm-mc` with the option enabled by default.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add option `use-fn-table-in-decode-to-mcinst` to use a table of function
pointers instead of a switch case in the generated `decodeToMCInst`
function.

When the number of switch cases in this function is large, the generated
code takes a long time to compile in release builds. Using a table of
function pointers instead improves the compile time significantly (~3x
speedup in compiling the code in a downstream target). This option will
allow targets to opt into this mode if they desire for better build
times.

Tested with `check-llvm-mc` with the option enabled by default.</pre>
</div>
</content>
</entry>
<entry>
<title>[TableGen] Avoid evaluating RHS of a BinOp until short-circuit is complete (#144021)</title>
<updated>2025-06-13T17:36:09+00:00</updated>
<author>
<name>Min-Yih Hsu</name>
<email>min.hsu@sifive.com</email>
</author>
<published>2025-06-13T17:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ecdb549e6de60b3211cfa860eec498270e3980f1'/>
<id>ecdb549e6de60b3211cfa860eec498270e3980f1</id>
<content type='text'>
This patch adds an even more aggressive short-circuit on `!and` and
`!or` that completely avoids the evaluation of RHS operand until short
circuiting decisions are made.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds an even more aggressive short-circuit on `!and` and
`!or` that completely avoids the evaluation of RHS operand until short
circuiting decisions are made.</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalISel] Fixes unused variable error in testMOPredicate_MO (#143364)</title>
<updated>2025-06-09T12:37:38+00:00</updated>
<author>
<name>jyli0116</name>
<email>yu.li@arm.com</email>
</author>
<published>2025-06-09T12:37:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7e00a7c0215b2043e04c365e85128969d8f25480'/>
<id>7e00a7c0215b2043e04c365e85128969d8f25480</id>
<content type='text'>
Solves unused variable error in generated Global ISel code due to
changes from #140935</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Solves unused variable error in generated Global ISel code due to
changes from #140935</pre>
</div>
</content>
</entry>
<entry>
<title>[GISel][AArch64] Allow PatLeafs to be imported in GISel which were previously causing warnings (#140935)</title>
<updated>2025-06-09T08:02:56+00:00</updated>
<author>
<name>jyli0116</name>
<email>yu.li@arm.com</email>
</author>
<published>2025-06-09T08:02:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f3ffee601c1746eafa9a6684541e90d182c9126e'/>
<id>f3ffee601c1746eafa9a6684541e90d182c9126e</id>
<content type='text'>
Previously PatLeafs could not be imported, causing the following
warnings to be emitted when running tblgen with
`-warn-on-skipped-patterns:`
```
/work/clean/llvm/lib/Target/AArch64/AArch64InstrInfo.td:2631:1: warning: Skipped pattern: Src pattern child has unsupported predicate
def : Pat&lt;(i64 (mul top32Zero:$Rn, top32Zero:$Rm)),
^
```
These changes allow the patterns to now be imported successfully.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously PatLeafs could not be imported, causing the following
warnings to be emitted when running tblgen with
`-warn-on-skipped-patterns:`
```
/work/clean/llvm/lib/Target/AArch64/AArch64InstrInfo.td:2631:1: warning: Skipped pattern: Src pattern child has unsupported predicate
def : Pat&lt;(i64 (mul top32Zero:$Rn, top32Zero:$Rm)),
^
```
These changes allow the patterns to now be imported successfully.</pre>
</div>
</content>
</entry>
<entry>
<title>[utils][TableGen] Handle versions on clause/directive spellings (#143021)</title>
<updated>2025-06-06T22:07:25+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-06-06T22:07:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7b2aa02a33df2ffd59fa1c043c10ec05dc411171'/>
<id>7b2aa02a33df2ffd59fa1c043c10ec05dc411171</id>
<content type='text'>
In "get&lt;lang&gt;DirectiveName(Kind, Version)", return the spelling that
corresponds to Version, and in "get&lt;lang&gt;DirectiveKindAndVersions(Name)"
return the pair {Kind, VersionRange}, where VersionRange contains the
minimum and the maximum versions that allow "Name" as a spelling. This
applies to clauses as well. In general it applies to classes that have
spellings (defined via TableGen class "Spelling").

Given a Kind and a Version, getting the corresponding spelling requires
a runtime search (which can fail in a general case). To avoid generating
the search function inline, a small additional component of
llvm/Frontent was added: LLVMFrontendDirective. The corresponding header
file also defines C++ classes "Spelling" and "VersionRange", which are
used in TableGen/DirectiveEmitter as well.

For background information see

https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In "get&lt;lang&gt;DirectiveName(Kind, Version)", return the spelling that
corresponds to Version, and in "get&lt;lang&gt;DirectiveKindAndVersions(Name)"
return the pair {Kind, VersionRange}, where VersionRange contains the
minimum and the maximum versions that allow "Name" as a spelling. This
applies to clauses as well. In general it applies to classes that have
spellings (defined via TableGen class "Spelling").

Given a Kind and a Version, getting the corresponding spelling requires
a runtime search (which can fail in a general case). To avoid generating
the search function inline, a small additional component of
llvm/Frontent was added: LLVMFrontendDirective. The corresponding header
file also defines C++ classes "Spelling" and "VersionRange", which are
used in TableGen/DirectiveEmitter as well.

For background information see

https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][TableGen] Print DecodeIdx for DecodeOps in DecoderEmitter (#142963)</title>
<updated>2025-06-06T04:57:26+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-06-06T04:57:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7005a7663871d05c41c941ec83717cde054bc9f1'/>
<id>7005a7663871d05c41c941ec83717cde054bc9f1</id>
<content type='text'>
Print DecodeIdx associated with Decode MCD ops in the generated decoder
tables. This can help in debugging decode failures by first mapping the
Op -&gt; DecodeIdx and then inspecting the code in `decodeToMCInst`
associated with that DecodeIdx.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Print DecodeIdx associated with Decode MCD ops in the generated decoder
tables. This can help in debugging decode failures by first mapping the
Op -&gt; DecodeIdx and then inspecting the code in `decodeToMCInst`
associated with that DecodeIdx.</pre>
</div>
</content>
</entry>
</feed>
