forked from OSchip/llvm-project
The X86 maximal stack alignment calculator preserves the CFG. Also,
be more careful about the return value of runOnMachineFunction. llvm-svn: 77758
This commit is contained in:
parent
6735e10fb0
commit
d0984565de
|
@ -1451,14 +1451,21 @@ namespace {
|
|||
RegNum < RI.getLastVirtReg(); ++RegNum)
|
||||
MaxAlign = std::max(MaxAlign, RI.getRegClass(RegNum)->getAlignment());
|
||||
|
||||
FFI->setMaxAlignment(MaxAlign);
|
||||
if (FFI->getMaxAlignment() == MaxAlign)
|
||||
return false;
|
||||
|
||||
return false;
|
||||
FFI->setMaxAlignment(MaxAlign);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "X86 Maximal Stack Alignment Calculator";
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
MachineFunctionPass::getAnalysisUsage(AU);
|
||||
}
|
||||
};
|
||||
|
||||
char MSAC::ID = 0;
|
||||
|
|
Loading…
Reference in New Issue