pack ItemIter using alignment bits rather than high bits
Summary: Using the alignment bits to store the index for a packed iterator is one of the steps toward better support of 32-bit platforms (and pointer authentication in future platforms, such as ARMv8.3-A). Previously this was complicated by a desire to make construction of a packed ItemIter as cheap as possible. The ItemPtr has a variable number of bits available due to alignment, which may not be sufficient to encode the index. This diff observes that we can piggyback on the chunk alignment to efficiently deduce the remaining bits of the index. If sizeof(Item) gives us only 2 bits of alignment, for example, then we can deduce 2 bits of the index from the Item*. Differential Revision: D8452991 fbshipit-source-id: 40dfd9957da3733090bb947646c553620cc7d33d
Showing
Please register or sign in to comment