diff options
author | Sander de Smalen <sander.desmalen@arm.com> | 2018-09-03 09:15:58 +0000 |
---|---|---|
committer | Sander de Smalen <sander.desmalen@arm.com> | 2018-09-03 09:15:58 +0000 |
commit | 84da64b52659d33f7c6143e494961533064d776a (patch) | |
tree | 6fc1094b45d721dd127e83f62b0cc2f469b2aedb /llvm/lib/Target/Lanai | |
parent | e95e99802daec037bd19e0481886337ff1fbd686 (diff) |
Extend hasStoreToStackSlot with list of FI accesses.
For instructions that spill/fill to and from multiple frame-indices
in a single instruction, hasStoreToStackSlot and hasLoadFromStackSlot
should return an array of accesses, rather than just the first encounter
of such an access.
This better describes FI accesses for AArch64 (paired) LDP/STP
instructions.
Reviewers: t.p.northover, gberry, thegameg, rengolin, javed.absar, MatzeB
Reviewed By: MatzeB
Differential Revision: https://reviews.llvm.org/D51537
Diffstat (limited to 'llvm/lib/Target/Lanai')
-rw-r--r-- | llvm/lib/Target/Lanai/LanaiInstrInfo.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/Lanai/LanaiInstrInfo.cpp b/llvm/lib/Target/Lanai/LanaiInstrInfo.cpp index 493d02bef37..398c84a2a19 100644 --- a/llvm/lib/Target/Lanai/LanaiInstrInfo.cpp +++ b/llvm/lib/Target/Lanai/LanaiInstrInfo.cpp @@ -733,8 +733,11 @@ unsigned LanaiInstrInfo::isLoadFromStackSlotPostFE(const MachineInstr &MI, if ((Reg = isLoadFromStackSlot(MI, FrameIndex))) return Reg; // Check for post-frame index elimination operations - const MachineMemOperand *Dummy; - return hasLoadFromStackSlot(MI, Dummy, FrameIndex); + SmallVector<TargetInstrInfo::FrameAccess, 1> Accesses; + if (hasLoadFromStackSlot(MI, Accesses)){ + FrameIndex = Accesses.begin()->FI; + return 1; + } } return 0; } |