LLVM  9.0.0svn
llvm::BasicBlockInfo Struct Reference

BasicBlockInfo - Information about the offset and size of a single basic block. More...

#include "Target/ARM/ARMBasicBlockInfo.h"

Collaboration diagram for llvm::BasicBlockInfo:
[legend]

## 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...

## Detailed Description

BasicBlockInfo - Information about the offset and size of a single basic block.

Definition at line 40 of file ARMBasicBlockInfo.h.

## ◆ BasicBlockInfo()

 llvm::BasicBlockInfo::BasicBlockInfo ( )
default

## ◆ internalKnownBits()

 unsigned llvm::BasicBlockInfo::internalKnownBits ( ) const
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 78 of file ARMBasicBlockInfo.h.

References llvm::tgtok::Bits, llvm::countTrailingZeros(), KnownBits, and Unalign.

Referenced by CompareMBBNumbers(), getUnconditionalBrDisp(), postKnownBits(), and postOffset().

## ◆ postKnownBits()

 unsigned llvm::BasicBlockInfo::postKnownBits ( unsigned LogAlign = 0 ) const
inline

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 104 of file ARMBasicBlockInfo.h.

References internalKnownBits(), and llvm::max().

## ◆ postOffset()

 unsigned llvm::BasicBlockInfo::postOffset ( unsigned LogAlign = 0 ) const
inline

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 90 of file ARMBasicBlockInfo.h.

References internalKnownBits(), llvm::max(), Size, and llvm::UnknownPadding().

Referenced by CompareMBBNumbers(), and getUnconditionalBrDisp().

## ◆ KnownBits

 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 61 of file ARMBasicBlockInfo.h.

Referenced by internalKnownBits().

## ◆ Offset

 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 50 of file ARMBasicBlockInfo.h.

Referenced by branchMaxOffsets(), and CompareMBBNumbers().

## ◆ PostAlign

 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 71 of file ARMBasicBlockInfo.h.

## ◆ Size

 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 57 of file ARMBasicBlockInfo.h.

Referenced by llvm::ARMBasicBlockUtils::adjustBBSize(), BBHasFallthrough(), and postOffset().

## ◆ Unalign

 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 66 of file ARMBasicBlockInfo.h.

Referenced by internalKnownBits().

The documentation for this struct was generated from the following file: