[PATCH] D104521: [InstrRef][AArch64][2/4] Recognise post-fe spills and restores
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 7 09:49:24 PDT 2021
dmgreen added a comment.
In D104521#2862075 <https://reviews.llvm.org/D104521#2862075>, @jmorse wrote:
> In D104521#2861294 <https://reviews.llvm.org/D104521#2861294>, @dmgreen wrote:
>
>> I happened to be looking at these functions for a different reason yesterday. Out of interest, is there anything that really makes them target dependent? It seems like it should be able to check what it needs via the MMO's PseudoValue without needing to look at opcodes (or regs, as Eli mentioned).
>
> I believe there's no target-independent way to identify the store-source register, which is what debug-info is interested in. On AArch64 it's the 3rd operand, on X86 it's the 6th (see sibling patch D105428 <https://reviews.llvm.org/D105428>). Previously debug-info has been looking for a killed register and assuming that that's the store-source, however there are various scenarios where spills don't kill registers.
Oh you are returning the register. None of the other implementations of isStoreToStackSlotPostFE seem to do that, they return 1/0 or true/false. It doesn't appear to be documented anywhere what it should be returning, other than the docs for isStoreToStackSlot. It might be worth shoring that up a bit. Either deciding that it returns a register and altering the existing implementations to match, or deciding it's a boolean (which might remove the need for a target method altogether, depending on whether checking the MMO is OK).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104521/new/
https://reviews.llvm.org/D104521
More information about the llvm-commits
mailing list