Remove unnecessary check that was subsumed into canRealignStack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108588 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2010-07-17 00:33:04 +00:00
parent 2b8271e029
commit 697cba8ec2
2 changed files with 4 additions and 6 deletions

View File

@@ -630,9 +630,8 @@ needsStackRealignment(const MachineFunction &MF) const {
const Function *F = MF.getFunction(); const Function *F = MF.getFunction();
const ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>(); const ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
unsigned StackAlign = MF.getTarget().getFrameInfo()->getStackAlignment(); unsigned StackAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
bool requiresRealignment = bool requiresRealignment = ((MFI->getMaxAlignment() > StackAlign) ||
RealignStack && ((MFI->getMaxAlignment() > StackAlign) || F->hasFnAttr(Attribute::StackAlignment));
F->hasFnAttr(Attribute::StackAlignment));
// FIXME: Currently we don't support stack realignment for functions with // FIXME: Currently we don't support stack realignment for functions with
// variable-sized allocas. // variable-sized allocas.

View File

@@ -456,9 +456,8 @@ bool X86RegisterInfo::canRealignStack(const MachineFunction &MF) const {
bool X86RegisterInfo::needsStackRealignment(const MachineFunction &MF) const { bool X86RegisterInfo::needsStackRealignment(const MachineFunction &MF) const {
const MachineFrameInfo *MFI = MF.getFrameInfo(); const MachineFrameInfo *MFI = MF.getFrameInfo();
const Function *F = MF.getFunction(); const Function *F = MF.getFunction();
bool requiresRealignment = bool requiresRealignment = ((MFI->getMaxAlignment() > StackAlign) ||
RealignStack && ((MFI->getMaxAlignment() > StackAlign) || F->hasFnAttr(Attribute::StackAlignment));
F->hasFnAttr(Attribute::StackAlignment));
// FIXME: Currently we don't support stack realignment for functions with // FIXME: Currently we don't support stack realignment for functions with
// variable-sized allocas. // variable-sized allocas.