Correct VOPD ComponentLayout to explicitly use ComponentProps of previous component (if any). Hopefully this will make code more clear.
This is actually an NFC change. It only affects one existing test for error position.
Differential D137952
[AMDGPU][GFX11] Refactor VOPD operands handling dp on Nov 14 2022, 7:30 AM. Authored by
Details
Correct VOPD ComponentLayout to explicitly use ComponentProps of previous component (if any). Hopefully this will make code more clear. This is actually an NFC change. It only affects one existing test for error position.
Diff Detail Event TimelineComment Actions This looks like a reasonable refactor. Why does it change the error position?
Comment Actions
Before this change getParsedSrcIndex handled tied operands as if they were parsed and returned dst index for tied operands: unsigned getParsedSrcIndex(unsigned SrcIdx, bool ComponentHasSrc2Acc) const { if (ComponentHasSrc2Acc && SrcIdx == (MAX_SRC_NUM - 1)) return getParsedDstIndex(); ... } This patch corrects handling of parsed operands: now they don't include tied ones.
Comment Actions Thanks for the explanation. Then this patch is nicely beneficial, but perhaps not NFC.
Comment Actions I suggest doing renaming in a separate patch because it is a separate problem introduced before this change. |