diff options
author | dim <dim@FreeBSD.org> | 2016-02-24 22:07:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-02-24 22:07:56 +0000 |
commit | 7964a6d9e94efb6a149df4b5a4fc07c99d4cde28 (patch) | |
tree | de35813fce0fe1effb9c40218b537fb972bdcbec /contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp | |
parent | 72672a13f91ec00fcf43f669f86c9706e973a925 (diff) | |
download | FreeBSD-src-7964a6d9e94efb6a149df4b5a4fc07c99d4cde28.zip FreeBSD-src-7964a6d9e94efb6a149df4b5a4fc07c99d4cde28.tar.gz |
Update llvm and clang to release_38 branch r261684.
Diffstat (limited to 'contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp index 11ae800..3f63d04 100644 --- a/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp +++ b/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp @@ -275,6 +275,18 @@ static bool isCSSave(MachineInstr *MBBI) { MBBI->getOpcode() == AArch64::STPDpre; } +bool AArch64FrameLowering::canUseAsPrologue( + const MachineBasicBlock &MBB) const { + const MachineFunction *MF = MBB.getParent(); + const AArch64Subtarget &Subtarget = MF->getSubtarget<AArch64Subtarget>(); + const AArch64RegisterInfo *RegInfo = Subtarget.getRegisterInfo(); + + // Don't need a scratch register if we're not going to re-align the stack. + // Otherwise, we may need a scratch register to be available and we do not + // support that for now. + return !RegInfo->needsStackRealignment(*MF); +} + void AArch64FrameLowering::emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const { MachineBasicBlock::iterator MBBI = MBB.begin(); |