pub enum Attribute {
KnownBits(Vec<Option<bool>>),
PowerOfTwo,
Negative,
NonNegative,
NonZero,
HasExternalUses,
SignBits(u8),
Range(i128, i128),
}
Expand description
Attributes describing data-flow facts known about a particular value or result of an instruction.
Variants§
KnownBits(Vec<Option<bool>>)
Bits that are known to be set or unset.
The vector must have an entry for each bit in the value, e.g. if the
value’s type is i32
, then the vector’s length must be 32.
If the i
th bit is known to be set, then the i
th entry should be
Some(true)
. If the i
th bit is known to be unset, then the i
th
entry should be Some(false)
. If it is unknown whether the i
th bit is
set or unset, or it can sometimes be either, then the i
th entry should
be None
.
PowerOfTwo
The value is known to be a power of two.
Negative
The value is known to be negative.
NonNegative
The value is known to be non-negative.
NonZero
The value is known to be non-zero.
HasExternalUses
The value is used by other expressions, not just this replacement’s expression DAG.
SignBits(u8)
It is known that there are n
sign bits in this value.
Range(i128, i128)
This value is within the range .0
(inclusive) to .1
(exclusive).