LLVM API Documentation
#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 | |
FunctionPass * | llvm::createBranchFoldingPass () |
static void | ReplaceUsesOfBlockWith (MachineBasicBlock *BB, MachineBasicBlock *Old, MachineBasicBlock *New, const TargetInstrInfo &TII) |
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 BB, llvm::BasicBlock::begin(), llvm::Function::end(), llvm::BasicBlock::end(), llvm::BasicBlock::getParent(), I, llvm::TargetInstrInfo::insertGoto(), llvm::TargetInstrInfo::isTerminatorInstr(), Succs, and TII.