[all-commits] [llvm/llvm-project] b2d1e0: [PowerPC][NFC] Small cleanup to restore CR field c...
Sean Fertile via All-commits
all-commits at lists.llvm.org
Thu Feb 13 06:51:25 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b2d1e002ca8a16acce7793324cdd155ef003d99f
https://github.com/llvm/llvm-project/commit/b2d1e002ca8a16acce7793324cdd155ef003d99f
Author: Sean Fertile <sd.fertile at gmail.com>
Date: 2020-02-13 (Thu, 13 Feb 2020)
Changed paths:
M llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
Log Message:
-----------
[PowerPC][NFC] Small cleanup to restore CR field code in PPCFrameLowering.
Skip the loop over the CalleSavedInfos in 'restoreCalleeSavedRegisters' when
the register is a CR field and we are not targeting 32-bit ELF. This is safe
because:
1) The helper function 'restoreCRs' returns if the target is not 32-bit ELF,
making all the code in the loop related to CR fields dead for every other
subtarget. This code is only called on ELF right now, but the patch
to extend it for AIX also needs to skip 'restoreCRs'.
2) The loop will not otherwise modify the iterator, so the iterator
manipulations at the bottom of the loop end up setting 'I' to its
current value.
This simplifciation allows us to remove one argument from 'restoreCRs'.
Also add a helper function to determine if a register is one of the
callee saved condition register fields.
More information about the All-commits
mailing list