class MachineBasicBlock

Declaration

class MachineBasicBlock { /* full declaration omitted */ };

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:65

Method Overview

Methods

bool CorrectExtraCFGEdges(
    llvm::MachineBasicBlock* DestA,
    llvm::MachineBasicBlock* DestB,
    bool IsCond)

Description

Various pieces of code can cause excess edges in the CFG to be inserted. If we have proven that MBB can only branch to DestA and DestB, remove any other MBB successors from the CFG. DestA and DestB can be null. Besides DestA and DestB, retain other edges leading to LandingPads (currently there can be only one; we don't check or require that here). Note it is possible that DestA and/or DestB are LandingPads.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:746

Parameters

llvm::MachineBasicBlock* DestA
llvm::MachineBasicBlock* DestB
bool IsCond

void ReplaceUsesOfBlockWith(
    llvm::MachineBasicBlock* Old,
    llvm::MachineBasicBlock* New)

Description

Given a machine basic block that branched to 'Old', change the code and CFG so that it branches to 'New' instead.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:734

Parameters

llvm::MachineBasicBlock* Old
llvm::MachineBasicBlock* New

int SkipPHIsAndLabels(int I)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:542

Parameters

int I

int SkipPHIsLabelsAndDebug(int I)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:547

Parameters

int I

llvm::MachineBasicBlock* SplitCriticalEdge(
    llvm::MachineBasicBlock* Succ,
    llvm::Pass& P)

Description

Split the critical edge from this block to the given successor block, and return the newly created block, or null if splitting is not possible. This function updates LiveVariables, MachineDominatorTree, and MachineLoopInfo, as applicable.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:591

Parameters

llvm::MachineBasicBlock* Succ
llvm::Pass& P

void addLiveIn(llvm::MCRegister PhysReg,
               llvm::LaneBitmask LaneMask =
                   LaneBitmask::getAll())

Description

Adds the specified register as a live in. Note that it is an error to add the same register to the same set more than once unless the intention is to call sortUniqueLiveIns after all registers are added.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:315

Parameters

llvm::MCRegister PhysReg
llvm::LaneBitmask LaneMask = LaneBitmask::getAll()

void addLiveIn(const llvm::MachineBasicBlock::
                   RegisterMaskPair& RegMaskPair)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:319

Parameters

const llvm::MachineBasicBlock::RegisterMaskPair& RegMaskPair

unsigned int addLiveIn(
    llvm::MCRegister PhysReg,
    const llvm::TargetRegisterClass* RC)

Description

Add PhysReg as live in to this block, and ensure that there is a copy of PhysReg to a virtual register of class RC. Return the virtual register that is a copy of the live in PhysReg.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:334

Parameters

llvm::MCRegister PhysReg
const llvm::TargetRegisterClass* RC

void addSuccessor(
    llvm::MachineBasicBlock* Succ,
    llvm::BranchProbability Prob =
        BranchProbability::getUnknown())

Description

Add Succ as a successor of this MachineBasicBlock. The Predecessors list of Succ is automatically updated. PROB parameter is stored in Probabilities list. The default probability is set as unknown. Mixing known and unknown probabilities in successor list is not allowed. When all successors have unknown probabilities, 1 / N is returned as the probability for each successor, where N is the number of successors. Note that duplicate Machine CFG edges are not allowed.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:438

Parameters

llvm::MachineBasicBlock* Succ
llvm::BranchProbability Prob = BranchProbability::getUnknown()

void addSuccessorWithoutProb(
    llvm::MachineBasicBlock* Succ)

Description

Add Succ as a successor of this MachineBasicBlock. The Predecessors list of Succ is automatically updated. The probability is not provided because BPI is not available (e.g. -O0 is used), in which case edge probabilities won't be used. Using this interface can save some space.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:445

Parameters

llvm::MachineBasicBlock* Succ

llvm::MachineInstr& back()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:196

const llvm::MachineInstr& back() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:198

int begin()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:216

int begin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:217

bool canFallThrough()

Description

Return true if the block can implicitly transfer control to the block after it by falling off the end of it. This should return false if it can reach the block after it, but it uses an explicit branch to do so (e.g., a table jump). True is a conservative answer.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:530

bool canSplitCriticalEdge(
    const llvm::MachineBasicBlock* Succ) const

Description

Check if the edge between this block and the given successor \p Succ, can be split. If this returns true a subsequent call to SplitCriticalEdge is guaranteed to return a valid basic block if no changes occurred in the meantime.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:597

Parameters

const llvm::MachineBasicBlock* Succ

void clear()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:700

void clearLiveIns()

Description

Clear live in list.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:329

llvm::MachineBasicBlock::LivenessQueryResult
computeRegisterLiveness(
    const llvm::TargetRegisterInfo* TRI,
    unsigned int Reg,
    int Before,
    unsigned int Neighborhood = 10) const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:783

Parameters

const llvm::TargetRegisterInfo* TRI
unsigned int Reg
int Before
unsigned int Neighborhood = 10

void copySuccessor(llvm::MachineBasicBlock* Orig,
                   int I)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:486

Parameters

llvm::MachineBasicBlock* Orig
int I

void dump() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:789

bool empty() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:188

int end()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:218

int end() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:219

int erase(int I)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:653

Parameters

int I

int erase(llvm::MachineInstr* I)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:679

Parameters

llvm::MachineInstr* I

int erase(int I)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:653

Parameters

int I

int erase(int I, int E)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:664

Parameters

int I
int E

void eraseFromParent()

Description

This method unlinks 'this' from the containing function and deletes it.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:730

int erase_instr(llvm::MachineInstr* I)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:659

Parameters

llvm::MachineInstr* I

llvm::DebugLoc findBranchDebugLoc()

Description

Find and return the merged DebugLoc of the branch instructions of the block. Return UnknownLoc if there is none.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:766

llvm::DebugLoc findDebugLoc(int MBBI)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:752

Parameters

int MBBI

llvm::DebugLoc findDebugLoc(int MBBI)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:752

Parameters

int MBBI

llvm::DebugLoc findPrevDebugLoc(int MBBI)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:759

Parameters

int MBBI

llvm::DebugLoc findPrevDebugLoc(int MBBI)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:759

Parameters

int MBBI

const llvm::MachineInstr& front() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:197

llvm::MachineInstr& front()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:195

llvm::Align getAlignment() const

Description

Return alignment of the basic block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:376

const llvm::BasicBlock* getBasicBlock() const

Description

Return the LLVM basic block that this instance corresponded to originally. Note that this may be NULL if this instance does not correspond directly to an LLVM basic block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:150

const uint32_t* getBeginClobberMask(
    const llvm::TargetRegisterInfo* TRI) const

Description

Get the clobber mask for the start of this basic block. Funclets use this to prevent register allocation across funclet transitions.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:369

Parameters

const llvm::TargetRegisterInfo* TRI

const uint32_t* getEndClobberMask(
    const llvm::TargetRegisterInfo* TRI) const

Description

Get the clobber mask for the end of the basic block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:373

Parameters

const llvm::TargetRegisterInfo* TRI

llvm::MachineBasicBlock* getFallThrough()

Description

Return the fallthrough block if the block can implicitly transfer control to the block after it by falling off the end of it. This should return null if it can reach the block after it, but it uses an explicit branch to do so (e.g., a table jump). Non-null return is a conservative answer.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:523

int getFirstInstrTerminator()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:558

int getFirstNonDebugInstr()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:562

int getFirstNonDebugInstr() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:563

int getFirstNonPHI()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:537

int getFirstTerminator() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:552

int getFirstTerminator()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:551

std::string getFullName() const

Description

Return a formatted string to identify this block and its parent function.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:156

Optional<uint64_t> getIrrLoopHeaderWeight() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:806

int getLastNonDebugInstr()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:569

int getLastNonDebugInstr() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:570

llvm::StringRef getName() const

Description

Return the name of the corresponding LLVM basic block, or an empty string.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:153

int getNumber() const

Description

MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFunction yet, in which case this will return -1.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:800

const llvm::MachineFunction* getParent() const

Description

Return the MachineFunction containing this basic block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:173

llvm::MachineFunction* getParent()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:174

static int llvm::MachineBasicBlock::*
getSublistAccess(llvm::MachineInstr*)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:232

Parameters

llvm::MachineInstr*

llvm::MCSymbol* getSymbol() const

Description

Return the MCSymbol for this basic block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:804

bool hasAddressTaken() const

Description

Test whether this block is potentially the target of an indirect branch.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:159

bool hasEHPadSuccessor() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:389

bool hasLabelMustBeEmitted() const

Description

Test whether this block must have its label emitted.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:166

bool hasSuccessorProbabilities() const

Description

Return true if any of the successors have probabilities attached to them.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:503

int insert(int I, llvm::MachineInstr* M)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:609

Parameters

int I
llvm::MachineInstr* M

int insert(int I, llvm::MachineInstr* M)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:609

Parameters

int I
llvm::MachineInstr* M

template <typename IT>
void insert(int I, IT S, IT E)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:613

Templates

IT

Parameters

int I
IT S
IT E

int insertAfter(int I, llvm::MachineInstr* MI)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:629

Parameters

int I
llvm::MachineInstr* MI

int insertAfterBundle(int I,
                      llvm::MachineInstr* MI)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:639

Parameters

int I
llvm::MachineInstr* MI

const llvm::MachineInstr& instr_back() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:193

llvm::MachineInstr& instr_back()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:191

int instr_begin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:201

int instr_begin()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:200

int instr_end() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:203

int instr_end()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:202

llvm::MachineInstr& instr_front()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:190

const llvm::MachineInstr& instr_front() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:192

int instr_rbegin()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:204

int instr_rbegin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:205

int instr_rend()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:206

int instr_rend() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:207

int instrs() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:212

int instrs()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:211

bool isCleanupFuncletEntry() const

Description

Returns true if this is the entry block of a cleanup funclet.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:406

bool isEHFuncletEntry() const

Description

Returns true if this is the entry block of an EH funclet.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:400

bool isEHPad() const

Description

Returns true if the block is a landing pad. That is this basic block is entered via an exception handler.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:383

bool isEHScopeEntry() const

Description

Returns true if this is the entry block of an EH scope, i.e., the block that used to have a catchpad or cleanuppad instruction in the LLVM IR.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:393

bool isEHScopeReturnBlock() const

Description

Convenience function that returns true if the bock ends in a EH scope return instruction.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:582

bool isLayoutSuccessor(
    const llvm::MachineBasicBlock* MBB) const

Description

Return true if the specified MBB will be emitted immediately after this block, such that if this block exits by falling through, control will transfer to the specified MBB. Note that MBB need not be a successor at all, for example if this block ends with an unconditional branch to some other block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:516

Parameters

const llvm::MachineBasicBlock* MBB

bool isLegalToHoistInto() const

Description

Returns true if it is legal to hoist instructions into this block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:412

bool isLiveIn(llvm::MCPhysReg Reg,
              llvm::LaneBitmask LaneMask =
                  LaneBitmask::getAll()) const

Description

Return true if the specified register is in the live in set.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:341

Parameters

llvm::MCPhysReg Reg
llvm::LaneBitmask LaneMask = LaneBitmask::getAll()

bool isPredecessor(
    const llvm::MachineBasicBlock* MBB) const

Description

Return true if the specified MBB is a predecessor of this block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:506

Parameters

const llvm::MachineBasicBlock* MBB

bool isReturnBlock() const

Description

Convenience function that returns true if the block ends in a return instruction.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:576

bool isSuccessor(
    const llvm::MachineBasicBlock* MBB) const

Description

Return true if the specified MBB is a successor of this block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:509

Parameters

const llvm::MachineBasicBlock* MBB

int livein_begin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:357

int livein_begin_dbg() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:352

bool livein_empty() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:359

int livein_end() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:358

int liveins() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:360

int liveins_dbg() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:353

void moveAfter(llvm::MachineBasicBlock* NewBefore)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:420

Parameters

llvm::MachineBasicBlock* NewBefore

void moveBefore(llvm::MachineBasicBlock* NewAfter)

Description

Move 'this' block before or after the specified block. This only moves the block, it does not modify the CFG or adjust potential fall-throughs at the end of the block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:419

Parameters

llvm::MachineBasicBlock* NewAfter

void normalizeSuccProbs()

Description

Normalize probabilities of all successors so that the sum of them becomes one. This is usually done when the current update on this MBB is done, and the sum of its successors' probabilities is not guaranteed to be one. The user is responsible for the correct use of this function. MBB::removeSuccessor() has an option to do this automatically.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:455

inline int phis()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:244

inline int phis() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:247

void pop_back()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:600

void pop_front()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:599

int pred_begin()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:264

int pred_begin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:265

bool pred_empty() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:279

int pred_end()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:266

int pred_end() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:267

int pred_rbegin()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:268

int pred_rbegin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:270

int pred_rend() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:274

int pred_rend()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:272

unsigned int pred_size() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:276

inline int predecessors() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:300

inline int predecessors()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:297

void print(llvm::raw_ostream& OS,
           llvm::ModuleSlotTracker& MST,
           const llvm::SlotIndexes* = nullptr,
           bool IsStandalone = true) const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:792

Parameters

llvm::raw_ostream& OS
llvm::ModuleSlotTracker& MST
const llvm::SlotIndexes* = nullptr
bool IsStandalone = true

void print(llvm::raw_ostream& OS,
           const llvm::SlotIndexes* = nullptr,
           bool IsStandalone = true) const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:790

Parameters

llvm::raw_ostream& OS
const llvm::SlotIndexes* = nullptr
bool IsStandalone = true

void printAsOperand(llvm::raw_ostream& OS,
                    bool PrintType = true) const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:796

Parameters

llvm::raw_ostream& OS
bool PrintType = true

void push_back(llvm::MachineInstr* MI)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:601

Parameters

llvm::MachineInstr* MI

llvm::MachineBasicBlock::reverse_iterator rbegin()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:220

llvm::MachineBasicBlock::const_reverse_iterator
rbegin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:223

llvm::MachineInstr* remove(llvm::MachineInstr* I)

Description

Remove the unbundled instruction from the instruction list without deleting it. This function can not be used to remove bundled instructions, use remove_instr to remove individual instructions from a bundle.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:688

Parameters

llvm::MachineInstr* I

llvm::MachineBasicBlock* removeFromParent()

Description

This method unlinks 'this' from the containing function, and returns it, but does not delete it.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:727

void removeLiveIn(llvm::MCPhysReg Reg,
                  llvm::LaneBitmask LaneMask =
                      LaneBitmask::getAll())

Description

Remove the specified register from the live in set.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:337

Parameters

llvm::MCPhysReg Reg
llvm::LaneBitmask LaneMask = LaneBitmask::getAll()

int removeLiveIn(int I)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:365

Parameters

int I

int removeSuccessor(
    int I,
    bool NormalizeSuccProbs = false)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:475

Parameters

int I
bool NormalizeSuccProbs = false

void removeSuccessor(
    llvm::MachineBasicBlock* Succ,
    bool NormalizeSuccProbs = false)

Description

Remove successor from the successors list of this MachineBasicBlock. The Predecessors list of Succ is automatically updated. If NormalizeSuccProbs is true, then normalize successors' probabilities after the successor is removed.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:467

Parameters

llvm::MachineBasicBlock* Succ
bool NormalizeSuccProbs = false

llvm::MachineInstr* remove_instr(
    llvm::MachineInstr* I)

Description

Remove the possibly bundled instruction from the instruction list without deleting it. If the instruction is part of a bundle, the other instructions in the bundle will still be bundled after removing the single instruction.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:698

Parameters

llvm::MachineInstr* I

llvm::MachineBasicBlock::const_reverse_iterator
rend() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:227

llvm::MachineBasicBlock::reverse_iterator rend()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:226

void replacePhiUsesWith(
    llvm::MachineBasicBlock* Old,
    llvm::MachineBasicBlock* New)

Description

Update all phi nodes in this basic block to refer to basic block \p New instead of basic block \p Old.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:738

Parameters

llvm::MachineBasicBlock* Old
llvm::MachineBasicBlock* New

void replaceSuccessor(
    llvm::MachineBasicBlock* Old,
    llvm::MachineBasicBlock* New)

Description

Replace successor OLD with NEW and update probability info.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:479

Parameters

llvm::MachineBasicBlock* Old
llvm::MachineBasicBlock* New

void setAlignment(llvm::Align A)

Description

Set alignment of the basic block.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:379

Parameters

llvm::Align A

void setHasAddressTaken()

Description

Set this block to reflect that it potentially is the target of an indirect branch.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:163

void setIrrLoopHeaderWeight(uint64_t Weight)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:810

Parameters

uint64_t Weight

void setIsCleanupFuncletEntry(bool V = true)

Description

Indicates if this is the entry block of a cleanup funclet.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:409

Parameters

bool V = true

void setIsEHFuncletEntry(bool V = true)

Description

Indicates if this is the entry block of an EH funclet.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:403

Parameters

bool V = true

void setIsEHPad(bool V = true)

Description

Indicates the block is a landing pad. That is this basic block is entered via an exception handler.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:387

Parameters

bool V = true

void setIsEHScopeEntry(bool V = true)

Description

Indicates if this is the entry block of an EH scope, i.e., the block that that used to have a catchpad or cleanuppad instruction in the LLVM IR.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:397

Parameters

bool V = true

void setLabelMustBeEmitted()

Description

Set this block to reflect that, regardless how we flow to it, we need its label be emitted.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:170

void setNumber(int N)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:801

Parameters

int N

void setSuccProbability(
    int I,
    llvm::BranchProbability Prob)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:448

Parameters

int I
llvm::BranchProbability Prob

unsigned int size() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:187

void sortUniqueLiveIns()

Description

Sorts and uniques the LiveIns vector. It can be significantly faster to do this than repeatedly calling isLiveIn before calling addLiveIn for every LiveIn insertion.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:326

void splice(int Where,
            llvm::MachineBasicBlock* Other,
            int From,
            int To)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:719

Parameters

int Where
llvm::MachineBasicBlock* Other
int From
int To

void splice(int Where,
            llvm::MachineBasicBlock* Other,
            int From)

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:708

Parameters

int Where
llvm::MachineBasicBlock* Other
int From

void splitSuccessor(
    llvm::MachineBasicBlock* Old,
    llvm::MachineBasicBlock* New,
    bool NormalizeSuccProbs = false)

Description

Split the old successor into old plus new and updates the probability info.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:490

Parameters

llvm::MachineBasicBlock* Old
llvm::MachineBasicBlock* New
bool NormalizeSuccProbs = false

int succ_begin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:281

int succ_begin()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:280

bool succ_empty() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:295

int succ_end() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:283

int succ_end()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:282

int succ_rbegin()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:284

int succ_rbegin() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:286

int succ_rend()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:288

int succ_rend() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:290

unsigned int succ_size() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:292

inline int successors()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:303

inline int successors() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:306

inline int terminators() const

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:239

inline int terminators()

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:236

void transferSuccessors(
    llvm::MachineBasicBlock* FromMBB)

Description

Transfers all the successors from MBB to this machine basic block (i.e., copies all the successors FromMBB and remove all the successors from FromMBB).

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:496

Parameters

llvm::MachineBasicBlock* FromMBB

void transferSuccessorsAndUpdatePHIs(
    llvm::MachineBasicBlock* FromMBB)

Description

Transfers all the successors, as in transferSuccessors, and update PHI operands in the successor blocks which refer to FromMBB to refer to this.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:500

Parameters

llvm::MachineBasicBlock* FromMBB

void updateTerminator()

Description

Update the terminator instructions in block to account for changes to the layout. If the block previously used a fallthrough, it may now need a branch, and if it previously used branching it may now be able to use a fallthrough.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:426

void validateSuccProbs() const

Description

Validate successors' probabilities and check if the sum of them is approximate one. This only works in DEBUG mode.

Declared at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:461