Add simple FP indicator for given function hook
authorAnton Korobeynikov <asl@math.spbu.ru>
Sun, 3 May 2009 13:00:28 +0000 (13:00 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sun, 3 May 2009 13:00:28 +0000 (13:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70705 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/MSP430/MSP430RegisterInfo.cpp

index f86f120d2b604d972221bd0c0ffbfebbd569b75b..b40cca988d9a07abff9082f2bfd11823522a5281 100644 (file)
 
 #include "MSP430.h"
 #include "MSP430RegisterInfo.h"
+#include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetOptions.h"
 #include "llvm/ADT/BitVector.h"
 
 using namespace llvm;
@@ -54,7 +56,7 @@ MSP430RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
 }
 
 bool MSP430RegisterInfo::hasFP(const MachineFunction &MF) const {
-  assert(0 && "Not implemented yet!");
+  return NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects();
 }
 
 void