#include "bolt/Core/FunctionLayout.h"
#include "bolt/Core/BinaryBasicBlock.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/edit_distance.h"
#include <algorithm>
#include <iterator>
usingnamespacellvm;
usingnamespacebolt;
FunctionFragment::FunctionFragment(FunctionLayout &Layout,
const FragmentNum Num)
: … { … }
FunctionFragment::iterator FunctionFragment::begin() { … }
FunctionFragment::const_iterator FunctionFragment::begin() const { … }
FunctionFragment::iterator FunctionFragment::end() { … }
FunctionFragment::const_iterator FunctionFragment::end() const { … }
const BinaryBasicBlock *FunctionFragment::front() const { … }
FunctionLayout::FunctionLayout() { … }
FunctionLayout::FunctionLayout(const FunctionLayout &Other)
: … { … }
FunctionLayout::FunctionLayout(FunctionLayout &&Other)
: … { … }
FunctionLayout &FunctionLayout::operator=(const FunctionLayout &Other) { … }
FunctionLayout &FunctionLayout::operator=(FunctionLayout &&Other) { … }
FunctionLayout::~FunctionLayout() { … }
FunctionFragment &FunctionLayout::addFragment() { … }
FunctionFragment &FunctionLayout::getFragment(FragmentNum Num) { … }
const FunctionFragment &FunctionLayout::getFragment(FragmentNum Num) const { … }
const FunctionFragment &
FunctionLayout::findFragment(const BinaryBasicBlock *const BB) const { … }
void FunctionLayout::addBasicBlock(BinaryBasicBlock *const BB) { … }
void FunctionLayout::insertBasicBlocks(
const BinaryBasicBlock *const InsertAfter,
const ArrayRef<BinaryBasicBlock *> NewBlocks) { … }
void FunctionLayout::eraseBasicBlocks(
const DenseSet<const BinaryBasicBlock *> ToErase) { … }
void FunctionLayout::updateLayoutIndices() const { … }
void FunctionLayout::updateLayoutIndices(
ArrayRef<BinaryBasicBlock *> Order) const { … }
bool FunctionLayout::update(const ArrayRef<BinaryBasicBlock *> NewLayout) { … }
void FunctionLayout::clear() { … }
const BinaryBasicBlock *
FunctionLayout::getBasicBlockAfter(const BinaryBasicBlock *BB,
bool IgnoreSplits) const { … }
bool FunctionLayout::isSplit() const { … }
uint64_t FunctionLayout::getEditDistance(
const ArrayRef<const BinaryBasicBlock *> OldBlockOrder) const { … }
FunctionLayout::block_const_iterator
FunctionLayout::findBasicBlockPos(const BinaryBasicBlock *BB) const { … }
FunctionLayout::block_iterator
FunctionLayout::findBasicBlockPos(const BinaryBasicBlock *BB) { … }