diff options
| author | Jim Grosbach <grosbach@apple.com> | 2010-02-22 23:10:38 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2010-02-22 23:10:38 +0000 |
| commit | 4642ad3af1cf508ac320b9afd25b065f08b36574 (patch) | |
| tree | c1dc05f9e433a2419c48dc5810f82f438367ce8a /include | |
| parent | 12f9168bc35da833097afdd551f3105b1d41a50f (diff) | |
| download | external_llvm-4642ad3af1cf508ac320b9afd25b065f08b36574.zip external_llvm-4642ad3af1cf508ac320b9afd25b065f08b36574.tar.gz external_llvm-4642ad3af1cf508ac320b9afd25b065f08b36574.tar.bz2 | |
Updated version of r96634 (which was reverted due to failing 176.gcc and
126.gcc nightly tests. These failures uncovered latent bugs that machine DCE
could remove one half of a stack adjust down/up pair, causing PEI to assert.
This update fixes that, and the tests now pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/llvm/Target/TargetRegisterInfo.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h index 65b60f7..212cc93 100644 --- a/include/llvm/Target/TargetRegisterInfo.h +++ b/include/llvm/Target/TargetRegisterInfo.h @@ -587,6 +587,17 @@ public: return !hasFP(MF); } + /// canSimplifyCallFramePseudos - When possible, it's best to simplify the + /// call frame pseudo ops before doing frame index elimination. This is + /// possible only when frame index references between the pseudos won't + /// need adjusted for the call frame adjustments. Normally, that's true + /// if the function has a reserved call frame or a frame pointer. Some + /// targets (Thumb2, for example) may have more complicated criteria, + /// however, and can override this behavior. + virtual bool canSimplifyCallFramePseudos(MachineFunction &MF) const { + return hasReservedCallFrame(MF) || hasFP(MF); + } + /// hasReservedSpillSlot - Return true if target has reserved a spill slot in /// the stack frame of the given function for the specified register. e.g. On /// x86, if the frame register is required, the first fixed stack object is |
