#include "source/opt/merge_return_pass.h"
#include <list>
#include <memory>
#include <utility>
#include "source/opt/instruction.h"
#include "source/opt/ir_builder.h"
#include "source/opt/ir_context.h"
#include "source/opt/reflect.h"
#include "source/util/bit_vector.h"
#include "source/util/make_unique.h"
namespace spvtools {
namespace opt {
Pass::Status MergeReturnPass::Process() { … }
void MergeReturnPass::GenerateState(BasicBlock* block) { … }
bool MergeReturnPass::ProcessStructured(
Function* function, const std::vector<BasicBlock*>& return_blocks) { … }
void MergeReturnPass::CreateReturnBlock() { … }
void MergeReturnPass::CreateReturn(BasicBlock* block) { … }
void MergeReturnPass::ProcessStructuredBlock(BasicBlock* block) { … }
void MergeReturnPass::BranchToBlock(BasicBlock* block, uint32_t target) { … }
void MergeReturnPass::UpdatePhiNodes(BasicBlock* new_source,
BasicBlock* target) { … }
void MergeReturnPass::CreatePhiNodesForInst(BasicBlock* merge_block,
Instruction& inst) { … }
bool MergeReturnPass::PredicateBlocks(
BasicBlock* return_block, std::unordered_set<BasicBlock*>* predicated,
std::list<BasicBlock*>* order) { … }
bool MergeReturnPass::BreakFromConstruct(
BasicBlock* block, std::unordered_set<BasicBlock*>* predicated,
std::list<BasicBlock*>* order, Instruction* break_merge_inst) { … }
void MergeReturnPass::RecordReturned(BasicBlock* block) { … }
void MergeReturnPass::RecordReturnValue(BasicBlock* block) { … }
void MergeReturnPass::AddReturnValue() { … }
void MergeReturnPass::AddReturnFlag() { … }
std::vector<BasicBlock*> MergeReturnPass::CollectReturnBlocks(
Function* function) { … }
void MergeReturnPass::MergeReturnBlocks(
Function* function, const std::vector<BasicBlock*>& return_blocks) { … }
void MergeReturnPass::AddNewPhiNodes() { … }
void MergeReturnPass::AddNewPhiNodes(BasicBlock* bb) { … }
void MergeReturnPass::RecordImmediateDominators(Function* function) { … }
void MergeReturnPass::InsertAfterElement(BasicBlock* element,
BasicBlock* new_element,
std::list<BasicBlock*>* list) { … }
bool MergeReturnPass::AddSingleCaseSwitchAroundFunction() { … }
BasicBlock* MergeReturnPass::CreateContinueTarget(uint32_t header_label_id) { … }
bool MergeReturnPass::CreateSingleCaseSwitch(BasicBlock* merge_target) { … }
bool MergeReturnPass::HasNontrivialUnreachableBlocks(Function* function) { … }
}
}