mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 13:21:29 +02:00
IMPORT: eb32: drop the now useless node_bit variable
This one was previously used to preload from the node and keep a copy in a register on i386 machines with few registers. With the new more optimal code it's totally useless, so let's get rid of it. By the way the 64 bit code didn't use that at all already. This is ebtree commit 1e219a74cfa09e785baf3637b6d55993d88b47ef.
This commit is contained in:
parent
c9e4adf608
commit
384907f4e7
@ -120,7 +120,6 @@ static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x)
|
||||
struct eb32_node *node;
|
||||
eb_troot_t *troot;
|
||||
u32 y, z;
|
||||
int node_bit;
|
||||
|
||||
troot = root->b[EB_LEFT];
|
||||
if (unlikely(troot == NULL))
|
||||
@ -141,9 +140,8 @@ static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x)
|
||||
__builtin_prefetch(node->node.branches.b[0], 0);
|
||||
__builtin_prefetch(node->node.branches.b[1], 0);
|
||||
|
||||
node_bit = node->node.bit;
|
||||
y = node->key ^ x;
|
||||
z = 1U << (node_bit & 31);
|
||||
z = 1U << (node->node.bit & 31);
|
||||
troot = (x & z) ? node->node.branches.b[1] : node->node.branches.b[0];
|
||||
|
||||
if (!y) {
|
||||
@ -151,7 +149,7 @@ static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x)
|
||||
* we have a dup tree. In the later case, we have to
|
||||
* walk it down left to get the first entry.
|
||||
*/
|
||||
if (node_bit < 0) {
|
||||
if (node->node.bit < 0) {
|
||||
troot = node->node.branches.b[EB_LEFT];
|
||||
while (eb_gettag(troot) != EB_LEAF)
|
||||
troot = (eb_untag(troot, EB_NODE))->b[EB_LEFT];
|
||||
@ -176,7 +174,6 @@ static forceinline struct eb32_node *__eb32i_lookup(struct eb_root *root, s32 x)
|
||||
eb_troot_t *troot;
|
||||
u32 key = x ^ 0x80000000;
|
||||
u32 y, z;
|
||||
int node_bit;
|
||||
|
||||
troot = root->b[EB_LEFT];
|
||||
if (unlikely(troot == NULL))
|
||||
@ -197,9 +194,8 @@ static forceinline struct eb32_node *__eb32i_lookup(struct eb_root *root, s32 x)
|
||||
__builtin_prefetch(node->node.branches.b[0], 0);
|
||||
__builtin_prefetch(node->node.branches.b[1], 0);
|
||||
|
||||
node_bit = node->node.bit;
|
||||
y = node->key ^ x;
|
||||
z = 1U << (node_bit & 31);
|
||||
z = 1U << (node->node.bit & 31);
|
||||
troot = (key & z) ? node->node.branches.b[1] : node->node.branches.b[0];
|
||||
|
||||
if (!y) {
|
||||
@ -207,7 +203,7 @@ static forceinline struct eb32_node *__eb32i_lookup(struct eb_root *root, s32 x)
|
||||
* we have a dup tree. In the later case, we have to
|
||||
* walk it down left to get the first entry.
|
||||
*/
|
||||
if (node_bit < 0) {
|
||||
if (node->node.bit < 0) {
|
||||
troot = node->node.branches.b[EB_LEFT];
|
||||
while (eb_gettag(troot) != EB_LEAF)
|
||||
troot = (eb_untag(troot, EB_NODE))->b[EB_LEFT];
|
||||
|
Loading…
x
Reference in New Issue
Block a user