From 9a4ea3a114d08a4e29323028b0a7a0cf649e92b3 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 2 Apr 2024 13:11:44 -0400 Subject: [PATCH] ValueDominanceValidation: do not validate inline constants Signed-off-by: Alyssa Rosenzweig --- .../Interface/IR/Passes/ValueDominanceValidation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FEXCore/Source/Interface/IR/Passes/ValueDominanceValidation.cpp b/FEXCore/Source/Interface/IR/Passes/ValueDominanceValidation.cpp index 530e6aacaa..cd51e824d8 100644 --- a/FEXCore/Source/Interface/IR/Passes/ValueDominanceValidation.cpp +++ b/FEXCore/Source/Interface/IR/Passes/ValueDominanceValidation.cpp @@ -97,7 +97,12 @@ bool ValueDominanceValidation::Run(IREmitter *IREmit) { const uint8_t NumArgs = IR::GetRAArgs(IROp->Op); for (uint32_t i = 0; i < NumArgs; ++i) { if (IROp->Args[i].IsInvalid()) continue; - if (CurrentIR.GetOp(IROp->Args[i])->Op == OP_IRHEADER) continue; + + // We do not validate the location of inline constants because it's + // irrelevant, they're ignored by RA and always inlined to where they + // need to be. This lets us pool inline constants globally. + IROps Op = CurrentIR.GetOp(IROp->Args[i])->Op; + if (Op == OP_IRHEADER || Op == OP_INLINECONSTANT) continue; OrderedNodeWrapper Arg = IROp->Args[i];