15 #ifndef LLVM_TRANSFORMS_IPO_LOWERBITSETS_H
16 #define LLVM_TRANSFORMS_IPO_LOWERBITSETS_H
48 return Bits.size() == 1;
59 Value *V, uint64_t COffset = 0)
const;
192 void allocate(
const std::set<uint64_t> &
Bits, uint64_t BitSize,
193 uint64_t &AllocByteOffset, uint8_t &AllocMask);
void push_back(const T &Elt)
A parsed version of the target data layout string in and methods for querying it. ...
This class is used to build a byte array containing overlapping bit sets.
std::vector< uint8_t > Bytes
The byte array built so far.
bool containsValue(const DataLayout &DL, const DenseMap< GlobalVariable *, uint64_t > &GlobalLayout, Value *V, uint64_t COffset=0) const
void allocate(const std::set< uint64_t > &Bits, uint64_t BitSize, uint64_t &AllocByteOffset, uint8_t &AllocMask)
Allocate BitSize bits in the byte array where Bits contains the bits to set.
SmallVector< uint64_t, 16 > Offsets
GlobalLayoutBuilder(uint64_t NumObjects)
std::vector< std::vector< uint64_t > > Fragments
The computed layout.
void addFragment(const std::set< uint64_t > &F)
Add F to the layout while trying to keep its indices contiguous.
std::vector< uint64_t > FragmentMap
Mapping from object index to fragment index.
uint64_t BitAllocs[BitsPerByte]
The number of bytes allocated so far for each of the bits.
bool isSingleOffset() const
std::set< uint64_t > Bits
This class implements a layout algorithm for globals referenced by bit sets that tries to keep member...
void addOffset(uint64_t Offset)
LLVM Value Representation.
bool containsGlobalOffset(uint64_t Offset) const