LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BranchFolding.cpp File Reference

#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/STLExtras.h"

Include dependency graph for BranchFolding.cpp:

Go to the source code of this file.

Functions

FunctionPassllvm::createBranchFoldingPass ()
static void ReplaceUsesOfBlockWith (MachineBasicBlock *BB, MachineBasicBlock *Old, MachineBasicBlock *New, const TargetInstrInfo &TII)


Function Documentation

static void ReplaceUsesOfBlockWith MachineBasicBlock BB,
MachineBasicBlock Old,
MachineBasicBlock New,
const TargetInstrInfo TII
[static]
 

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

Definition at line 78 of file BranchFolding.cpp.

References llvm::MachineBasicBlock::addSuccessor(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::end(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getParent(), I, llvm::TargetInstrInfo::insertGoto(), llvm::TargetInstrInfo::isTerminatorInstr(), llvm::MachineBasicBlock::removeSuccessor(), llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().