diff options
| author | Jim Grosbach <grosbach@apple.com> | 2010-01-19 18:31:11 +0000 | 
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2010-01-19 18:31:11 +0000 | 
| commit | 04770f2aa13bf1e2503a9737d1e4bdad3d721f1c (patch) | |
| tree | 713bb666fc33f8cd5d22ac1a0f845865b0c0107c /llvm/lib/Target/X86/X86RegisterInfo.cpp | |
| parent | 18f49ce2d39f828ba7a82018566bb7edb66a9289 (diff) | |
| download | bcm5719-llvm-04770f2aa13bf1e2503a9737d1e4bdad3d721f1c.tar.gz bcm5719-llvm-04770f2aa13bf1e2503a9737d1e4bdad3d721f1c.zip | |
For aligned load/store instructions, it's only required to know whether a
function can support dynamic stack realignment. That's a much easier question
to answer at instruction selection stage than whether the function actually
will have dynamic alignment prologue. This allows the removal of the
stack alignment heuristic pass, and improves code quality for cases where
the heuristic would result in dynamic alignment code being generated when
it was not strictly necessary.
llvm-svn: 93885
Diffstat (limited to 'llvm/lib/Target/X86/X86RegisterInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/X86RegisterInfo.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp index d96aafda603..4bc2c9e4b26 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.cpp +++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp @@ -438,6 +438,12 @@ bool X86RegisterInfo::hasFP(const MachineFunction &MF) const {            (MMI && MMI->callsUnwindInit()));  } +bool X86RegisterInfo::canRealignStack(const MachineFunction &MF) const { +  const MachineFrameInfo *MFI = MF.getFrameInfo(); +  return (RealignStack && +          !MFI->hasVarSizedObjects()); +} +  bool X86RegisterInfo::needsStackRealignment(const MachineFunction &MF) const {    const MachineFrameInfo *MFI = MF.getFrameInfo();    bool requiresRealignment = | 

