<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/utils/TableGen/RegisterBankEmitter.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>[NFC][TableGen] Add {} for `else` when `if` body has {} (#139420)</title>
<updated>2025-05-12T15:34:12+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-05-12T15:34:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2e8b539e7138122ae6bd54a2dddc296386bd7e28'/>
<id>2e8b539e7138122ae6bd54a2dddc296386bd7e28</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>TableGen: Optimize super-register class computation (#134865)</title>
<updated>2025-04-10T19:00:08+00:00</updated>
<author>
<name>Nicolai Hähnle</name>
<email>nicolai.haehnle@amd.com</email>
</author>
<published>2025-04-10T19:00:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9c31155ead6e68450b8c2de38f5bec8f5c5db810'/>
<id>9c31155ead6e68450b8c2de38f5bec8f5c5db810</id>
<content type='text'>
Inferring super-register classes naively requires checking every
register class against every other register class and sub-register
index.
Each of those checks is itself a non-trivial operation on register sets.

Culling as many (RC, RC, SubIdx) triples as possible is important for
the running time of TableGen for architectures with complex sub-register
relations.

Use transitivity to cull many (RC, RC, SubIdx) triples. This
unfortunately requires us to complete the transitive closure of
super-register classes explicitly, but it still cuts down the running
time on AMDGPU substantially -- in some upcoming work in the
backend by more than half (in very rough measurements).

This changes the names of some of the inferred register classes, since
the order in which they are inferred changes. The names of the inferred
register classes become shorter, which reduces the size of the generated
files.

Replacing some uses of SmallPtrSet by DenseSet shaves off a few more
percent; there are hundreds of register classes in AMDGPU.

Tweaking the topological signature check to skip reigsters without
super-registers further helps skip register classes that have "pseudo"
registers in them whose sub- and super-register structure is trivial.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Inferring super-register classes naively requires checking every
register class against every other register class and sub-register
index.
Each of those checks is itself a non-trivial operation on register sets.

Culling as many (RC, RC, SubIdx) triples as possible is important for
the running time of TableGen for architectures with complex sub-register
relations.

Use transitivity to cull many (RC, RC, SubIdx) triples. This
unfortunately requires us to complete the transitive closure of
super-register classes explicitly, but it still cuts down the running
time on AMDGPU substantially -- in some upcoming work in the
backend by more than half (in very rough measurements).

This changes the names of some of the inferred register classes, since
the order in which they are inferred changes. The names of the inferred
register classes become shorter, which reduces the size of the generated
files.

Replacing some uses of SmallPtrSet by DenseSet shaves off a few more
percent; there are hundreds of register classes in AMDGPU.

Tweaking the topological signature check to skip reigsters without
super-registers further helps skip register classes that have "pseudo"
registers in them whose sub- and super-register structure is trivial.</pre>
</div>
</content>
</entry>
<entry>
<title>[TableGen] Factor out timer code into a new `TGTimer` class (#111054)</title>
<updated>2024-10-04T16:23:55+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2024-10-04T16:23:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d883ef10767c5ac22b43f7f9f49e4565e7ce8263'/>
<id>d883ef10767c5ac22b43f7f9f49e4565e7ce8263</id>
<content type='text'>
Factor out the timer related functionality from `RecordKeeper` to a new
`TGTimer` class in a new file.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Factor out the timer related functionality from `RecordKeeper` to a new
`TGTimer` class in a new file.</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM][TableGen] Change RegisterBankEmitter to use const RecordKeeper (#109195)</title>
<updated>2024-09-19T03:45:26+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2024-09-19T03:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=56015da593b646489c43263625cd2a8ceb7ef906'/>
<id>56015da593b646489c43263625cd2a8ceb7ef906</id>
<content type='text'>
Change RegisterBankEmitter to use const RecordKeeper.

This is a part of effort to have better const correctness in TableGen
backends:


https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change RegisterBankEmitter to use const RecordKeeper.

This is a part of effort to have better const correctness in TableGen
backends:


https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089</pre>
</div>
</content>
</entry>
<entry>
<title>[GISel][TableGen] Generate getRegBankFromRegClass (#99896)</title>
<updated>2024-07-25T13:41:55+00:00</updated>
<author>
<name>Kai Nacke</name>
<email>kai.peter.nacke@ibm.com</email>
</author>
<published>2024-07-25T13:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a79db96ec0decca4fe45579e039cf5589345b3ed'/>
<id>a79db96ec0decca4fe45579e039cf5589345b3ed</id>
<content type='text'>
Generating the mapping from a register class to a register bank is
complex:
 - there can be lots of register classes
 - the mapping may be ambiguos
- a register class can span several register banks (e.g. a register
class containing all registers)
- the type information is not enough to decide which register bank to
map to (e.g. a register class containing floating point and vector
registers, and all register can represent a f64 value)

The approach taken here is to encode the register banks in an array
indexed by the ID of the register class. To save space, the entries are
packed into chunks of size 2^n.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generating the mapping from a register class to a register bank is
complex:
 - there can be lots of register classes
 - the mapping may be ambiguos
- a register class can span several register banks (e.g. a register
class containing all registers)
- the type information is not enough to decide which register bank to
map to (e.g. a register class containing floating point and vector
registers, and all register can represent a f64 value)

The approach taken here is to encode the register banks in an array
indexed by the ID of the register class. To save space, the entries are
packed into chunks of size 2^n.</pre>
</div>
</content>
</entry>
<entry>
<title>[RFC][TableGen] Restructure TableGen Source (#80847)</title>
<updated>2024-03-25T08:40:35+00:00</updated>
<author>
<name>Pierre van Houtryve</name>
<email>pierre.vanhoutryve@amd.com</email>
</author>
<published>2024-03-25T08:40:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fa3d789df15bd1f58fb8ba4ea3be909218cf7f03'/>
<id>fa3d789df15bd1f58fb8ba4ea3be909218cf7f03</id>
<content type='text'>
Refactor of the llvm-tblgen source into:
- a "Basic" library, which contains the bare minimum utilities to build
`llvm-min-tablegen`
- a "Common" library which contains all of the helpers for TableGen
backends. Such helpers can be shared by more than one backend, and even
unit tested (e.g. CodeExpander is, maybe we can add more over time)

Fixes #80647</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactor of the llvm-tblgen source into:
- a "Basic" library, which contains the bare minimum utilities to build
`llvm-min-tablegen`
- a "Common" library which contains all of the helpers for TableGen
backends. Such helpers can be shared by more than one backend, and even
unit tested (e.g. CodeExpander is, maybe we can add more over time)

Fixes #80647</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] clang-format utils/TableGen (#80973)</title>
<updated>2024-02-09T08:27:04+00:00</updated>
<author>
<name>Pierre van Houtryve</name>
<email>pierre.vanhoutryve@amd.com</email>
</author>
<published>2024-02-09T08:27:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9079baaddfed5e604fbfaa1d81a7a1c38e78c26'/>
<id>b9079baaddfed5e604fbfaa1d81a7a1c38e78c26</id>
<content type='text'>
```
find llvm/utils/TableGen -iname "*.h" -o -iname "*.cpp" | xargs clang-format-16 -i
```

Split from #80847</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
find llvm/utils/TableGen -iname "*.h" -o -iname "*.cpp" | xargs clang-format-16 -i
```

Split from #80847</pre>
</div>
</content>
</entry>
<entry>
<title>[GISel] Make RegBank constructor constexpr. NFC (#71109)</title>
<updated>2023-11-03T01:05:05+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2023-11-03T01:05:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1021404619724568d62f53e575b61ae84e82ca02'/>
<id>1021404619724568d62f53e575b61ae84e82ca02</id>
<content type='text'>
RegBanks are constructed as global objects. Making the constructor
constexpr helps the compiler construct it without a global
constructor.
    
clang's optimizer seems to figure this out on its own, but at
least gcc 8 does not.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RegBanks are constructed as global objects. Making the constructor
constexpr helps the compiler construct it without a global
constructor.
    
clang's optimizer seems to figure this out on its own, but at
least gcc 8 does not.</pre>
</div>
</content>
</entry>
<entry>
<title>[TableGen][NFC] Refine obtaining qualified register class ids.</title>
<updated>2023-08-03T10:07:57+00:00</updated>
<author>
<name>Ivan Kosarev</name>
<email>ivan.kosarev@amd.com</email>
</author>
<published>2023-08-03T09:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4e814b10ecd60244b6061cfd8c9cba3136d1a38c'/>
<id>4e814b10ecd60244b6061cfd8c9cba3136d1a38c</id>
<content type='text'>
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D156110
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D156110
</pre>
</div>
</content>
</entry>
<entry>
<title>[TableGen][GlobalISel] Account for HwMode in RegisterBank register sizes</title>
<updated>2023-06-03T06:14:17+00:00</updated>
<author>
<name>Nitin John Raj</name>
<email>nitin.raj@sifive.com</email>
</author>
<published>2023-06-03T05:08:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aa7eace8431ba213c5431638b894b0e1b4b481c7'/>
<id>aa7eace8431ba213c5431638b894b0e1b4b481c7</id>
<content type='text'>
This patch adds logic for determining RegisterBank size to RegisterBankInfo, which allows accounting for the HwMode of the target. Individual RegisterBanks cannot be constructed with HwMode information as construction is generated by TableGen, but a RegisterBankInfo subclass can provide the HwMode as a constructor argument. The HwMode is used to select the appropriate RegisterBank size from an array relating sizes to RegisterBanks.

Targets simply need to provide the HwMode argument to the &lt;target&gt;GenRegisterBankInfo constructor. The RISC-V RegisterBankInfo constructor has been updated accordingly (plus an unused argument removed).

Reviewed By: simoncook, craig.topper

Differential Revision: https://reviews.llvm.org/D76007
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds logic for determining RegisterBank size to RegisterBankInfo, which allows accounting for the HwMode of the target. Individual RegisterBanks cannot be constructed with HwMode information as construction is generated by TableGen, but a RegisterBankInfo subclass can provide the HwMode as a constructor argument. The HwMode is used to select the appropriate RegisterBank size from an array relating sizes to RegisterBanks.

Targets simply need to provide the HwMode argument to the &lt;target&gt;GenRegisterBankInfo constructor. The RISC-V RegisterBankInfo constructor has been updated accordingly (plus an unused argument removed).

Reviewed By: simoncook, craig.topper

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