[PATCH] D144687: [GlobalISel][NFC] Add MachineInstr::getFirst[N]{Regs,LLTs}() helpers to extract regs & types.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 09:54:44 PST 2023
arsenm added a comment.
In D144687#4160524 <https://reviews.llvm.org/D144687#4160524>, @aemerson wrote:
>> I’ve thought about adding a MachineValue that acts more like an SDValue which would track the type and index
>
> I like the idea in principal, but I worry that it'll be tempting to pass those around as first class values, when they're moreso just ephemerally tied at the point in time. You could imagine a situation where the type of a register is mutated but references to MachineValue being held due to sharing end up stale. With separate registers and types it's harder to fall into that trap.
I don’t really see a case where you can legally mutate a register type.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144687/new/
https://reviews.llvm.org/D144687
More information about the llvm-commits
mailing list