ValueDominanceValidation: do not validate inline constants

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig 2024-04-02 13:11:44 -04:00
parent 0e99019586
commit a775e474d5

View File

@ -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_Header>(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_Header>(IROp->Args[i])->Op;
if (Op == OP_IRHEADER || Op == OP_INLINECONSTANT) continue;
OrderedNodeWrapper Arg = IROp->Args[i];