Updated spirv-tools.

This commit is contained in:
Бранимир Караџић
2019-05-18 12:27:37 -07:00
parent 44b5913550
commit abab48ebce
110 changed files with 8867 additions and 1641 deletions

View File

@@ -147,6 +147,19 @@ BasicBlock* Function::InsertBasicBlockAfter(
return nullptr;
}
BasicBlock* Function::InsertBasicBlockBefore(
std::unique_ptr<BasicBlock>&& new_block, BasicBlock* position) {
for (auto bb_iter = begin(); bb_iter != end(); ++bb_iter) {
if (&*bb_iter == position) {
new_block->SetParent(this);
bb_iter = bb_iter.InsertBefore(std::move(new_block));
return &*bb_iter;
}
}
assert(false && "Could not find insertion point.");
return nullptr;
}
bool Function::IsRecursive() const {
IRContext* ctx = blocks_.front()->GetLabel()->context();
IRContext::ProcessFunction mark_visited = [this](Function* fp) {