mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
unused version of collide line sphere collide list (#1071)
This commit is contained in:
@@ -1247,6 +1247,43 @@ bool ControlFlowGraph::clean_up_asm_branches() {
|
||||
old_seq->parent_claim(seq);
|
||||
bds->parent_claim(seq);
|
||||
|
||||
return false;
|
||||
} else if (b0_seq && !b1_seq) {
|
||||
replaced = true;
|
||||
m_blocks.at(bds->succ_branch->get_first_block_id())->needs_label = true;
|
||||
|
||||
auto* seq = dynamic_cast<SequenceVtx*>(b0);
|
||||
assert(seq);
|
||||
|
||||
if (b0->succ_branch) {
|
||||
b0->succ_branch->replace_preds_with_and_check({b0}, nullptr);
|
||||
}
|
||||
|
||||
if (bds->succ_branch) {
|
||||
// likely delay slots "branch" in this graph.
|
||||
bds->succ_branch->replace_preds_with_and_check({bds}, nullptr);
|
||||
}
|
||||
|
||||
seq->seq.push_back(bds);
|
||||
|
||||
seq->seq.push_back(b1);
|
||||
|
||||
for (auto* x : b1->succs()) {
|
||||
// printf("fix preds of %s\n", x->to_string().c_str());
|
||||
x->replace_pred_and_check(b1, seq);
|
||||
}
|
||||
seq->succ_branch = b1->succ_branch;
|
||||
seq->succ_ft = b1->succ_ft;
|
||||
seq->end_branch = b1->end_branch;
|
||||
seq->next = b1->next;
|
||||
if (seq->next) {
|
||||
seq->next->prev = seq;
|
||||
}
|
||||
|
||||
// todo - proper trash?
|
||||
b1->parent_claim(seq);
|
||||
bds->parent_claim(seq);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user