aco: Migrate RA to use std::optional
authorTatsuyuki Ishi <ishitatsuyuki@gmail.com>
Fri, 2 Dec 2022 08:00:10 +0000 (17:00 +0900)
committerMarge Bot <emma+marge@anholt.net>
Thu, 8 Dec 2022 12:08:01 +0000 (12:08 +0000)
commit327c906424390a0edde3d2ab65b7b174c23f2a76
tree64d9fe3ca8c989907b87d001d9b8ce8ae14f2ace
parenta3249415e23854268786e2838583913f8b34c61c
aco: Migrate RA to use std::optional

The use of std::optional simplifies expressions and would be useful for some
upcoming RA tweaks.

C++17 has been available since the merge of rusticl and should be safe to use as
far as packaging is concerned.

A few style choices are:
- Testing for emptiness uses implicit bool conversion.
- Constructing an empty value uses {}.
- Constructing a filled value uses the implicit conversion constructor.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20125>
src/amd/compiler/aco_register_allocation.cpp