Displaying 2 results from an estimated 2 matches for "fieldof".
Did you mean:
field
2020 Jun 23
2
[RFC] Small Bitfield utilities
...unsigned Value = bitfield<Amount>(Storage);
> bool Cond = bitfield<Amount>(Storage).isSet();
>
> 3. In between
> code: https://reviews.llvm.org/D82058#inline-754912
>
> uint8_t Storage = 0;
> using Amount = Bitfield<unsigned, 0, 4>;
>
> Amount::fieldOf(Storage) = true;
> unsigned Value = Amount::fieldOf(Storage);
> bool Cond = Amount::isSet(Storage);
>
>
> Proposal 1 has the inconvenience of polluting the llvm namespace but is
> also simpler implementation wise.
> 2 and 3 are more involved and add their own gotchas (cast...
2020 Jun 11
2
[RFC] Small Bitfield utilities
TL;DR: Have support in ADT for typed values packing into opaque scalar types
- Code & design choices: https://reviews.llvm.org/D81580
- Usage:
https://reviews.llvm.org/differential/changeset/?ref=2005337&whitespace=ignore-most
- Example of rewrite: https://reviews.llvm.org/D81662
*CONTEXT*
There are places in LLVM where we need to pack typed fields into opaque
values.
For instance,