remove some dead code
This peculiar sequence which checked a condition and then asserted the opposite of it inside the branch seems just plain wrong. We are probably lucky compilers did not take advantage of the conflicting condition and assumption and conclude this was dead code and remove the entire function. The remaining assertion/assumption should now be usable by the compiler. As far as I can tell, this was broken since this code was first written in commit 7d0a8b74. This was picked up by building with warnings enabled but no optimisation. Clang complains that the call to state_rule_taken_get inside __builtin_assume is impure. This should not be true and I think Clang is wrong, though I'm surprised it cannot see that read_raw() is pure. Naturally this only came in when we started aggressively packing structure members, so would not have been noticed previously.
parent
7fb1f026
Please register or sign in to comment