[CPU] Added disable_context_promotion option
This disable ContextPromotionPass that causes instability in some games
This commit is contained in:
parent
8af296a200
commit
0712132ed0
|
@ -28,6 +28,11 @@
|
||||||
DEFINE_bool(dump_translated_hir_functions, false, "dumps translated hir",
|
DEFINE_bool(dump_translated_hir_functions, false, "dumps translated hir",
|
||||||
"CPU");
|
"CPU");
|
||||||
|
|
||||||
|
DEFINE_bool(disable_context_promotion, false,
|
||||||
|
"Disables Context Promotion optimizations, this may be needed for "
|
||||||
|
"some sports games, but will reduce performance.",
|
||||||
|
"CPU");
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace cpu {
|
namespace cpu {
|
||||||
namespace ppc {
|
namespace ppc {
|
||||||
|
@ -54,10 +59,17 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) : frontend_(frontend) {
|
||||||
|
|
||||||
// Passes are executed in the order they are added. Multiple of the same
|
// Passes are executed in the order they are added. Multiple of the same
|
||||||
// pass type may be used.
|
// pass type may be used.
|
||||||
if (validate) compiler_->AddPass(std::make_unique<passes::ValidationPass>());
|
if (!cvars::disable_context_promotion) {
|
||||||
compiler_->AddPass(std::make_unique<passes::ContextPromotionPass>());
|
if (validate) {
|
||||||
if (validate) compiler_->AddPass(std::make_unique<passes::ValidationPass>());
|
compiler_->AddPass(std::make_unique<passes::ValidationPass>());
|
||||||
|
}
|
||||||
|
|
||||||
|
compiler_->AddPass(std::make_unique<passes::ContextPromotionPass>());
|
||||||
|
|
||||||
|
if (validate) {
|
||||||
|
compiler_->AddPass(std::make_unique<passes::ValidationPass>());
|
||||||
|
}
|
||||||
|
}
|
||||||
// Grouped simplification + constant propagation.
|
// Grouped simplification + constant propagation.
|
||||||
// Loops until no changes are made.
|
// Loops until no changes are made.
|
||||||
auto sap = std::make_unique<passes::ConditionalGroupPass>();
|
auto sap = std::make_unique<passes::ConditionalGroupPass>();
|
||||||
|
|
Loading…
Reference in New Issue