effect overrides: Add notaskstate & refactor slightly (#45448)
* effect overrides: Add notaskstate & refactor slightly
This adds an effect override for `:notaskstate` and shifts the
`:total`, meta-effect around slightly to prepare for any potential
future expansion. In particular `:total` now means the maximum
possible set of effects and should likely include any future additions.
The assume_effects macro learned to do negation, so we can now write
things like `:total :!nothrow`, which will be helpful writing tests
that care about one effect in particular, but are otherwise total.
The previous `:total_may_throw`, was renamed `:foldable` and includes
the effects required to allow compile-time constant folding. At this
point I don't anticipate the introduction of additional effects that
would affect constant-foldability, but if such an effect were introduced,
it would be added to `:foldable`. Note however, that `:foldable`
does not include `:notaskstate` (though as noted in the docstring,
because of the strong requirements of `:consistent` and `:effect_free`,
it is implied that anything annotated `:notaskstate` may be DCEd
and thus `:notaskstate` is implied). Nevertheless, `:notaskstate` is
not included in the `:foldable` override and future effect additions
may further separate `:foldable` from `:total`.
* minor tweaks
Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com>