LLVM
8.0.1
|
BasicBlockInfo - Information about the offset and size of a single basic block. More...
#include "Target/ARM/ARMBasicBlockInfo.h"
Public Member Functions | |
BasicBlockInfo ()=default | |
unsigned | internalKnownBits () const |
Compute the number of known offset bits internally to this block. More... | |
unsigned | postOffset (unsigned LogAlign=0) const |
Compute the offset immediately following this block. More... | |
unsigned | postKnownBits (unsigned LogAlign=0) const |
Compute the number of known low bits of postOffset. More... | |
Public Attributes | |
unsigned | Offset = 0 |
Offset - Distance from the beginning of the function to the beginning of this basic block. More... | |
unsigned | Size = 0 |
Size - Size of the basic block in bytes. More... | |
uint8_t | KnownBits = 0 |
KnownBits - The number of low bits in Offset that are known to be exact. More... | |
uint8_t | Unalign = 0 |
Unalign - When non-zero, the block contains instructions (inline asm) of unknown size. More... | |
uint8_t | PostAlign = 0 |
PostAlign - When non-zero, the block terminator contains a .align directive, so the end of the block is aligned to 1 << PostAlign bytes. More... | |
BasicBlockInfo - Information about the offset and size of a single basic block.
Definition at line 37 of file ARMBasicBlockInfo.h.
|
default |
|
inline |
Compute the number of known offset bits internally to this block.
This number should be used to predict worst case padding when splitting the block.
Definition at line 75 of file ARMBasicBlockInfo.h.
References llvm::tgtok::Bits, llvm::countTrailingZeros(), KnownBits, and Unalign.
Referenced by CompareMBBNumbers(), getUnconditionalBrDisp(), postKnownBits(), and postOffset().
Compute the number of known low bits of postOffset.
If this block contains inline asm, the number of known bits drops to the instruction alignment. An aligned terminator may increase the number of know bits. If LogAlign is given, also consider the alignment of the next block.
Definition at line 101 of file ARMBasicBlockInfo.h.
References internalKnownBits(), and llvm::max().
Compute the offset immediately following this block.
If LogAlign is specified, return the offset the successor block will get if it has this alignment.
Definition at line 87 of file ARMBasicBlockInfo.h.
References internalKnownBits(), llvm::max(), Size, and llvm::UnknownPadding().
Referenced by CompareMBBNumbers(), and getUnconditionalBrDisp().
uint8_t llvm::BasicBlockInfo::KnownBits = 0 |
KnownBits - The number of low bits in Offset that are known to be exact.
The remaining bits of Offset are an upper bound.
Definition at line 58 of file ARMBasicBlockInfo.h.
Referenced by internalKnownBits().
unsigned llvm::BasicBlockInfo::Offset = 0 |
Offset - Distance from the beginning of the function to the beginning of this basic block.
Offsets are computed assuming worst case padding before an aligned block. This means that subtracting basic block offsets always gives a conservative estimate of the real distance which may be smaller.
Because worst case padding is used, the computed offset of an aligned block may not actually be aligned.
Definition at line 47 of file ARMBasicBlockInfo.h.
Referenced by branchMaxOffsets(), and CompareMBBNumbers().
uint8_t llvm::BasicBlockInfo::PostAlign = 0 |
PostAlign - When non-zero, the block terminator contains a .align directive, so the end of the block is aligned to 1 << PostAlign bytes.
Definition at line 68 of file ARMBasicBlockInfo.h.
Referenced by llvm::computeBlockSize().
unsigned llvm::BasicBlockInfo::Size = 0 |
Size - Size of the basic block in bytes.
If the block contains inline assembly, this is a worst case estimate.
The size does not include any alignment padding whether from the beginning of the block, or from an aligned jump table at the end.
Definition at line 54 of file ARMBasicBlockInfo.h.
Referenced by BBHasFallthrough(), llvm::computeBlockSize(), and postOffset().
uint8_t llvm::BasicBlockInfo::Unalign = 0 |
Unalign - When non-zero, the block contains instructions (inline asm) of unknown size.
The real size may be smaller than Size bytes by a multiple of 1 << Unalign.
Definition at line 63 of file ARMBasicBlockInfo.h.
Referenced by llvm::computeBlockSize(), and internalKnownBits().