#include "source/opt/cfg.h"
#include <memory>
#include <utility>
#include "source/cfa.h"
#include "source/opt/ir_builder.h"
#include "source/opt/ir_context.h"
#include "source/opt/module.h"
namespace spvtools {
namespace opt {
namespace {
cbb_ptr;
constexpr int kMaxResultId = …;
}
CFG::CFG(Module* module)
: … { … }
void CFG::AddEdges(BasicBlock* blk) { … }
void CFG::RemoveNonExistingEdges(uint32_t blk_id) { … }
void CFG::ComputeStructuredOrder(Function* func, BasicBlock* root,
std::list<BasicBlock*>* order) { … }
void CFG::ComputeStructuredOrder(Function* func, BasicBlock* root,
BasicBlock* end,
std::list<BasicBlock*>* order) { … }
void CFG::ForEachBlockInPostOrder(BasicBlock* bb,
const std::function<void(BasicBlock*)>& f) { … }
void CFG::ForEachBlockInReversePostOrder(
BasicBlock* bb, const std::function<void(BasicBlock*)>& f) { … }
bool CFG::WhileEachBlockInReversePostOrder(
BasicBlock* bb, const std::function<bool(BasicBlock*)>& f) { … }
void CFG::ComputeStructuredSuccessors(Function* func) { … }
void CFG::ComputePostOrderTraversal(BasicBlock* bb,
std::vector<BasicBlock*>* order,
std::unordered_set<BasicBlock*>* seen) { … }
BasicBlock* CFG::SplitLoopHeader(BasicBlock* bb) { … }
}
}