Go to the documentation of this file.
13 #ifndef LLVM_SUPPORT_MEMORY_H
14 #define LLVM_SUPPORT_MEMORY_H
17 #include <system_error>
36 void *
base()
const {
return Address; }
100 std::error_code &EC);
177 #endif // ifndef NDEBUG
size_t allocatedSize() const
The size as it was allocated.
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
static void InvalidateInstructionCache(const void *Addr, size_t Len)
InvalidateInstructionCache - Before the JIT can run a block of code that has been emitted it must inv...
static MemoryBlock allocateMappedMemory(size_t NumBytes, const MemoryBlock *const NearBlock, unsigned Flags, std::error_code &EC)
This method allocates a block of memory that is suitable for loading dynamically generated code (e....
static std::error_code releaseMappedMemory(MemoryBlock &Block)
This method releases a block of memory that was allocated with the allocateMappedMemory method.
This class encapsulates the notion of a memory block which has an address and a size.
OwningMemoryBlock & operator=(OwningMemoryBlock &&Other)
@ MF_HUGE_HINT
The MF_HUGE_HINT flag is used to indicate that the request for a memory block should be satisfied wit...
std::error_code release()
OwningMemoryBlock(MemoryBlock M)
This class implements an extremely fast bulk output stream that can only output to a stream.
Owning version of MemoryBlock.
size_t allocatedSize() const
The size as it was allocated.
OwningMemoryBlock(OwningMemoryBlock &&Other)
This class provides various memory handling functions that manipulate MemoryBlock instances.
OwningMemoryBlock()=default
MemoryBlock getMemoryBlock() const
std::optional< std::vector< StOtherPiece > > Other
static std::error_code protectMappedMemory(const MemoryBlock &Block, unsigned Flags)
This method sets the protection flags for a block of memory to the state specified by /p Flags.
MemoryBlock(void *addr, size_t allocatedSize)
raw_ostream & operator<<(raw_ostream &OS, const Memory::ProtectionFlags &PF)
Debugging output for Memory::ProtectionFlags.