-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[PowerPC] Avoid repeated hash lookups (NFC) #131724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PowerPC] Avoid repeated hash lookups (NFC) #131724
Conversation
@llvm/pr-subscribers-backend-powerpc Author: Kazu Hirata (kazutakahirata) ChangesFull diff: https://github.com/llvm/llvm-project/pull/131724.diff 1 Files Affected:
diff --git a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
index f62434d57dcd3..429994e09cc5c 100644
--- a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
@@ -2489,22 +2489,23 @@ bool PPCFrameLowering::spillCalleeSavedRegisters(
if (Spilled[Dst])
continue;
- if (VSRContainingGPRs[Dst].second != 0) {
+ auto &VSR = VSRContainingGPRs[Dst];
+ if (VSR.second != 0) {
assert(Subtarget.hasP9Vector() &&
"mtvsrdd is unavailable on pre-P9 targets.");
NumPESpillVSR += 2;
BuildMI(MBB, MI, DL, TII.get(PPC::MTVSRDD), Dst)
- .addReg(VSRContainingGPRs[Dst].first, getKillRegState(true))
- .addReg(VSRContainingGPRs[Dst].second, getKillRegState(true));
- } else if (VSRContainingGPRs[Dst].second == 0) {
+ .addReg(VSR.first, getKillRegState(true))
+ .addReg(VSR.second, getKillRegState(true));
+ } else if (VSR.second == 0) {
assert(Subtarget.hasP8Vector() &&
"Can't move GPR to VSR on pre-P8 targets.");
++NumPESpillVSR;
BuildMI(MBB, MI, DL, TII.get(PPC::MTVSRD),
TRI->getSubReg(Dst, PPC::sub_64))
- .addReg(VSRContainingGPRs[Dst].first, getKillRegState(true));
+ .addReg(VSR.first, getKillRegState(true));
} else {
llvm_unreachable("More than two GPRs spilled to a VSR!");
}
|
Co-authored-by: Nikita Popov <[email protected]>
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/172/builds/10997 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/3816 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/5025 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/29/builds/11910 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/155/builds/7615 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/185/builds/15151 Here is the relevant piece of the build log for the reference
|
No description provided.