]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rb_tree: optimize tree rotation
authorDoug Moore <dougm@FreeBSD.org>
Sat, 25 Jun 2022 07:40:16 +0000 (02:40 -0500)
committerDoug Moore <dougm@FreeBSD.org>
Sat, 25 Jun 2022 07:40:16 +0000 (02:40 -0500)
commit61c74fb66f1bef776923cbd5b2a62fb06b003f0c
tree50bc3db9977d63fb00771c53d5b6176c0aa90d01
parente3b31e23ffdf009d41a7f74ba76271f1307f44e2
rb_tree: optimize tree rotation

The RB_ROTATE macros begin with fetching a field via a pointer. In
most cases, that value is one that has already been pulled into a
register, and the compiler cannot infer that. So, to eliminate those
needless fetches, have the caller of the RB_ROTATE macros present the
data in the third macro parameter, rather than having the macro fetch
it.

Differential Revision: https://reviews.freebsd.org/D35520
sys/sys/tree.h