HomeFreeBSD

rb_tree: optimize tree rotation

Description

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

Details

Provenance
dougmAuthored on Jun 25 2022, 7:40 AM
Differential Revision
D35520: rb_tree: optimize tree rotation
Parents
rGe3b31e23ffdf: stress2: Added two syzkaller reproducers
Branches
Unknown
Tags
Unknown