15 #ifndef LLVM_TRANSFORMS_IPO_LOWERTYPETESTS_H
16 #define LLVM_TRANSFORMS_IPO_LOWERTYPETESTS_H
36 namespace lowertypetests {
54 return Bits.size() == 1;
196 void allocate(
const std::set<uint64_t> &
Bits, uint64_t BitSize,
197 uint64_t &AllocByteOffset, uint8_t &AllocMask);
209 #endif // LLVM_TRANSFORMS_IPO_LOWERTYPETESTS_H
This class implements a layout algorithm for globals referenced by bit sets that tries to keep member...
void push_back(const T &Elt)
This class is used to build a byte array containing overlapping bit sets.
void print(raw_ostream &OS) const
A Module instance is used to store all the information related to an LLVM module. ...
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.
void addOffset(uint64_t Offset)
std::vector< uint8_t > Bytes
The byte array built so far.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
std::vector< uint64_t > FragmentMap
Mapping from object index to fragment index.
A CRTP mix-in to automatically provide informational APIs needed for passes.
bool isSingleOffset() const
A set of analyses that are preserved following a run of a transformation pass.
uint64_t BitAllocs[BitsPerByte]
The number of bytes allocated so far for each of the bits.
SmallVector< uint64_t, 16 > Offsets
Module.h This file contains the declarations for the Module class.
GlobalLayoutBuilder(uint64_t NumObjects)
void addFragment(const std::set< uint64_t > &F)
Add F to the layout while trying to keep its indices contiguous.
This class implements an extremely fast bulk output stream that can only output to a stream...
A container for analyses that lazily runs them and caches their results.
std::set< uint64_t > Bits
This header defines various interfaces for pass management in LLVM.
std::vector< std::vector< uint64_t > > Fragments
The computed layout.
bool containsGlobalOffset(uint64_t Offset) const