early-access version 2595
This commit is contained in:
parent
c94418145e
commit
d7301c48b1
5 changed files with 14 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2592.
|
This is the source code for early-access 2595.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -148,8 +148,8 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable*
|
||||||
config.wall_clock_cntpct = uses_wall_clock;
|
config.wall_clock_cntpct = uses_wall_clock;
|
||||||
|
|
||||||
// Code cache size
|
// Code cache size
|
||||||
config.code_cache_size = 128_MiB;
|
config.code_cache_size = 512_MiB;
|
||||||
config.far_code_offset = 100_MiB;
|
config.far_code_offset = 400_MiB;
|
||||||
|
|
||||||
// Safe optimizations
|
// Safe optimizations
|
||||||
if (Settings::values.cpu_debug_mode) {
|
if (Settings::values.cpu_debug_mode) {
|
||||||
|
|
|
@ -208,8 +208,8 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable*
|
||||||
config.wall_clock_cntpct = uses_wall_clock;
|
config.wall_clock_cntpct = uses_wall_clock;
|
||||||
|
|
||||||
// Code cache size
|
// Code cache size
|
||||||
config.code_cache_size = 128_MiB;
|
config.code_cache_size = 512_MiB;
|
||||||
config.far_code_offset = 100_MiB;
|
config.far_code_offset = 400_MiB;
|
||||||
|
|
||||||
// Safe optimizations
|
// Safe optimizations
|
||||||
if (Settings::values.cpu_debug_mode) {
|
if (Settings::values.cpu_debug_mode) {
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <boost/container/small_vector.hpp>
|
||||||
|
|
||||||
#include "shader_recompiler/frontend/ir/basic_block.h"
|
#include "shader_recompiler/frontend/ir/basic_block.h"
|
||||||
#include "shader_recompiler/frontend/ir/value.h"
|
#include "shader_recompiler/frontend/ir/value.h"
|
||||||
#include "shader_recompiler/ir_opt/passes.h"
|
#include "shader_recompiler/ir_opt/passes.h"
|
||||||
|
@ -25,15 +29,14 @@ void DeadInstElimination(IR::Block* const block) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeletedPhiArgElimination(IR::Program& program, const std::vector<IR::Block*>& dead_blocks) {
|
void DeletedPhiArgElimination(IR::Program& program, std::span<const IR::Block*> dead_blocks) {
|
||||||
for (IR::Block* const block : program.blocks) {
|
for (IR::Block* const block : program.blocks) {
|
||||||
for (IR::Inst& phi : *block) {
|
for (IR::Inst& phi : *block) {
|
||||||
if (!IR::IsPhi(phi)) {
|
if (!IR::IsPhi(phi)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (size_t i = 0; i < phi.NumArgs(); ++i) {
|
for (size_t i = 0; i < phi.NumArgs(); ++i) {
|
||||||
const auto it{std::find(dead_blocks.begin(), dead_blocks.end(), phi.PhiBlock(i))};
|
if (std::ranges::find(dead_blocks, phi.PhiBlock(i)) == dead_blocks.end()) {
|
||||||
if (it == dead_blocks.end()) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Phi operand at this index is an unreachable block
|
// Phi operand at this index is an unreachable block
|
||||||
|
@ -45,7 +48,7 @@ void DeletedPhiArgElimination(IR::Program& program, const std::vector<IR::Block*
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeadBranchElimination(IR::Program& program) {
|
void DeadBranchElimination(IR::Program& program) {
|
||||||
std::vector<IR::Block*> dead_blocks;
|
boost::container::small_vector<const IR::Block*, 3> dead_blocks;
|
||||||
const auto begin_it{program.syntax_list.begin()};
|
const auto begin_it{program.syntax_list.begin()};
|
||||||
for (auto node_it = begin_it; node_it != program.syntax_list.end(); ++node_it) {
|
for (auto node_it = begin_it; node_it != program.syntax_list.end(); ++node_it) {
|
||||||
if (node_it->type != IR::AbstractSyntaxNode::Type::If) {
|
if (node_it->type != IR::AbstractSyntaxNode::Type::If) {
|
||||||
|
@ -88,7 +91,7 @@ void DeadBranchElimination(IR::Program& program) {
|
||||||
--node_it;
|
--node_it;
|
||||||
}
|
}
|
||||||
if (!dead_blocks.empty()) {
|
if (!dead_blocks.empty()) {
|
||||||
DeletedPhiArgElimination(program, dead_blocks);
|
DeletedPhiArgElimination(program, std::span(dead_blocks.data(), dead_blocks.size()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue