mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-07-04 10:28:02 -05:00
shader: Inline common IR::Block methods
This commit is contained in:
@ -69,24 +69,12 @@ u32 Block::LocationEnd() const noexcept {
|
||||
return location_end;
|
||||
}
|
||||
|
||||
Block::InstructionList& Block::Instructions() noexcept {
|
||||
return instructions;
|
||||
}
|
||||
|
||||
const Block::InstructionList& Block::Instructions() const noexcept {
|
||||
return instructions;
|
||||
}
|
||||
|
||||
void Block::AddImmediatePredecessor(Block* block) {
|
||||
if (std::ranges::find(imm_predecessors, block) == imm_predecessors.end()) {
|
||||
imm_predecessors.push_back(block);
|
||||
}
|
||||
}
|
||||
|
||||
std::span<IR::Block* const> Block::ImmediatePredecessors() const noexcept {
|
||||
return imm_predecessors;
|
||||
}
|
||||
|
||||
static std::string BlockToIndex(const std::map<const Block*, size_t>& block_to_index,
|
||||
Block* block) {
|
||||
if (const auto it{block_to_index.find(block)}; it != block_to_index.end()) {
|
||||
|
Reference in New Issue
Block a user