aco/ir: add float control definition flags
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
This commit is contained in:
@@ -911,7 +911,8 @@ private:
|
||||
class Definition final {
|
||||
public:
|
||||
constexpr Definition()
|
||||
: temp(Temp(0, s1)), reg_(0), isFixed_(0), isKill_(0), isPrecise_(0), isNUW_(0), isNoCSE_(0)
|
||||
: temp(Temp(0, s1)), reg_(0), isFixed_(0), isKill_(0), isPrecise_(0), isInfPreserve_(0),
|
||||
isNaNPreserve_(0), isSZPreserve_(0), isNUW_(0), isNoCSE_(0)
|
||||
{}
|
||||
Definition(uint32_t index, RegClass type) noexcept : temp(index, type) {}
|
||||
explicit Definition(Temp tmp) noexcept : temp(tmp) {}
|
||||
@@ -955,6 +956,18 @@ public:
|
||||
|
||||
constexpr bool isPrecise() const noexcept { return isPrecise_; }
|
||||
|
||||
constexpr void setInfPreserve(bool inf_preserve) noexcept { isInfPreserve_ = inf_preserve; }
|
||||
|
||||
constexpr bool isInfPreserve() const noexcept { return isInfPreserve_; }
|
||||
|
||||
constexpr void setNaNPreserve(bool nan_preserve) noexcept { isNaNPreserve_ = nan_preserve; }
|
||||
|
||||
constexpr bool isNaNPreserve() const noexcept { return isNaNPreserve_; }
|
||||
|
||||
constexpr void setSZPreserve(bool sz_preserve) noexcept { isSZPreserve_ = sz_preserve; }
|
||||
|
||||
constexpr bool isSZPreserve() const noexcept { return isSZPreserve_; }
|
||||
|
||||
/* No Unsigned Wrap */
|
||||
constexpr void setNUW(bool nuw) noexcept { isNUW_ = nuw; }
|
||||
|
||||
@@ -972,6 +985,9 @@ private:
|
||||
uint8_t isFixed_ : 1;
|
||||
uint8_t isKill_ : 1;
|
||||
uint8_t isPrecise_ : 1;
|
||||
uint8_t isInfPreserve_ : 1;
|
||||
uint8_t isNaNPreserve_ : 1;
|
||||
uint8_t isSZPreserve_ : 1;
|
||||
uint8_t isNUW_ : 1;
|
||||
uint8_t isNoCSE_ : 1;
|
||||
};
|
||||
|
||||
@@ -150,6 +150,16 @@ print_definition(const Definition* definition, FILE* output, unsigned flags)
|
||||
print_reg_class(definition->regClass(), output);
|
||||
if (definition->isPrecise())
|
||||
fprintf(output, "(precise)");
|
||||
if (definition->isInfPreserve() || definition->isNaNPreserve() || definition->isSZPreserve()) {
|
||||
fprintf(output, "(");
|
||||
if (definition->isSZPreserve())
|
||||
fprintf(output, "Sz");
|
||||
if (definition->isInfPreserve())
|
||||
fprintf(output, "Inf");
|
||||
if (definition->isNaNPreserve())
|
||||
fprintf(output, "NaN");
|
||||
fprintf(output, "Preserve)");
|
||||
}
|
||||
if (definition->isNUW())
|
||||
fprintf(output, "(nuw)");
|
||||
if (definition->isNoCSE())
|
||||
|
||||
Reference in New Issue
Block a user