mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-21 12:04:45 +00:00
Update control_flow_graph.cpp
updated with code review suggestions
This commit is contained in:
parent
4eaa098677
commit
a374e7c583
1 changed files with 4 additions and 3 deletions
|
@ -107,13 +107,14 @@ void CFG::EmitBlocks() {
|
|||
|
||||
// TODO: Investigate how to make sure this does not go out of bounds.
|
||||
// Is inst_list always the size of labels?
|
||||
const auto& end_inst = inst_list[i+1];
|
||||
const size_t end_index = getindex(end) - 1;
|
||||
const auto& end_inst = inst_list[end_index];
|
||||
|
||||
Block* block = block_pool.Create();
|
||||
block->begin = start;
|
||||
block->end = end;
|
||||
block->begin_index = i;
|
||||
block->end_index = i + 1;
|
||||
block->begin_index = getindex(start);
|
||||
block->end_index = end_index;
|
||||
block->end_inst = end_inst;
|
||||
block->cond = MakeCondition(end_inst.opcode);
|
||||
blocks.insert(*block);
|
||||
|
|
Loading…
Add table
Reference in a new issue