[PATCH] D62565: [PowerPC] Exploiting to use mtvsrdd instruction when save called-saved GPR register to VSR registers
Qiu Chaofan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 00:05:51 PST 2021
qiucf added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCFrameLowering.h:33
+ // TODO: Use local table in methods to avoid this mutable member.
+ mutable DenseMap<unsigned, SmallVector<Register, 2>> VSRToGPRs;
+
----------------
nemanjai wrote:
> I am curious why this maps from `unsigned`. Why not from `Register`?
> Also, I think it makes sense to map to `std::pair` since there will be (at most) two GPR's.
>
> Finally, I think the name is confusing. I understand that it is mapping a VSR to GPRs, but since this optimization is moving stuff between registers, it can easily be misunderstood to mean that we are moving a VSR to GPRs. I think a better name would be something like `VSRContainsGPRs`.
Ah, I just used `unsigned` to align with class `CalleeSavedInfo` definition:
```
class CalleeSavedInfo {
Register Reg;
union {
int FrameIdx;
unsigned DstReg;
};
//...
};
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62565/new/
https://reviews.llvm.org/D62565
More information about the llvm-commits
mailing list