Commit 4f1f5a7
committed
Remove fls(), use pg_leftmost_one_pos32() instead.
Commit 4f658dc provided the traditional BSD fls() function in
src/port/fls.c so it could be used in several places. Later we added a
bunch of similar facilities in pg_bitutils.h, based on compiler
builtins that map to hardware instructions. It's a bit confusing to
have both 1-based and 0-based variants of this operation in use in
different parts of the tree, and neither is blessed by a standard.
Let's drop fls.c and the configure probe, and reuse the newer code.
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CA%2BhUKG%2B7dSX1XF8yFGmYk-%3D48dbjH2kmzZj16XvhbrWP-9BzRg%40mail.gmail.com1 parent 3225399 commit 4f1f5a7
File tree
11 files changed
+19
-92
lines changed- src
- backend
- access/hash
- optimizer
- path
- prep
- utils/mmgr
- include
- port
- tools/msvc
11 files changed
+19
-92
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16771 | 16771 | | |
16772 | 16772 | | |
16773 | 16773 | | |
16774 | | - | |
16775 | | - | |
16776 | | - | |
16777 | | - | |
16778 | | - | |
16779 | | - | |
16780 | | - | |
16781 | | - | |
16782 | | - | |
16783 | | - | |
16784 | | - | |
16785 | | - | |
16786 | | - | |
16787 | 16774 | | |
16788 | 16775 | | |
16789 | 16776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1911 | 1911 | | |
1912 | 1912 | | |
1913 | 1913 | | |
1914 | | - | |
1915 | 1914 | | |
1916 | 1915 | | |
1917 | 1916 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
1491 | 1492 | | |
1492 | 1493 | | |
1493 | 1494 | | |
1494 | | - | |
| 1495 | + | |
1495 | 1496 | | |
1496 | 1497 | | |
1497 | 1498 | | |
| |||
1542 | 1543 | | |
1543 | 1544 | | |
1544 | 1545 | | |
1545 | | - | |
| 1546 | + | |
1546 | 1547 | | |
1547 | 1548 | | |
1548 | 1549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
| 678 | + | |
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | 194 | | |
198 | 195 | | |
199 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | 369 | | |
374 | 370 | | |
375 | 371 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
0 commit comments