On Fri, Oct 21, 2022 at 11:45:33AM -0500, Segher Boessenkool wrote: > On Fri, Oct 21, 2022 at 03:14:26PM +0200, Aldy Hernandez via Gcc-patches > wrote: > > The name nonzero_bits is confusing. We're not tracking nonzero bits. > > We're tracking known-zero bits, or at the worst we're tracking "maye > > nonzero bits". But really, the only thing we're sure about in the > > "nonzero" bits are the bits that are zero, which are known to be 0. > > We're not tracking nonzero bits. > > Indeed. > > > I know we've been carrying around this name forever, but the fact that > > both of the maintainers of the code *HATE* it, should be telling. > > Also, we'd also like to track known-one bits in the irange, so it's > > best to keep the nomenclature consistent. > > And that as well. > > However: > > > * asan.cc (handle_builtin_alloca): Rename *nonzero* to *known_zero*. > > Our "nonzero" means "not known to be zero", not "known to be zero", so > this renaming makes it worse than it was. Rename it to
Agreed. I think maybe_nonzero_bits would be fine. Anyway, the reason it is called this way is that we have similar APIs on the RTL side, nonzero_bits* in rtlanal.cc. So if we rename, it should be renamed consistently. > "not_known_zero", make that a thin wrapper around a new "known_zero", > and slowly get rid of not_known_zero? Jakub