Temporarily reverting r56683. This is causing a failure during the build of llvm...
authorBill Wendling <isanbard@gmail.com>
Fri, 26 Sep 2008 22:10:44 +0000 (22:10 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 26 Sep 2008 22:10:44 +0000 (22:10 +0000)
/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -mmacosx-version-min=10.4 -O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Gir/devel/llvm/clean/llvm.obj/include -I/Volumes/Gir/devel/llvm/clean/llvm.src/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc.src/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o
Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Gir/devel/llvm/clean/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311.
../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
{standard input}:3521:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
{standard input}:3521:symbol: "_dwarf_reg_size_table" can't be undefined in a subtraction expression
{standard input}:3520:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56703 91177308-0d34-0410-b5e6-96231b3b80d8

13 files changed:
include/llvm/CodeGen/MachineFrameInfo.h
lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
lib/Target/ARM/ARMRegisterInfo.cpp
lib/Target/Alpha/AlphaRegisterInfo.cpp
lib/Target/CellSPU/SPURegisterInfo.cpp
lib/Target/IA64/IA64RegisterInfo.cpp
lib/Target/Mips/MipsRegisterInfo.cpp
lib/Target/PowerPC/PPCRegisterInfo.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86RegisterInfo.cpp
test/CodeGen/X86/x86-64-frameaddr.ll
test/CodeGen/X86/x86-frameaddr.ll
test/CodeGen/X86/x86-frameaddr2.ll

index 363f20634831311cb813182e3c58099d02565e16..6c49eaf88e03a52ae479ff6c78d725fa4a148cd4 100644 (file)
@@ -118,10 +118,6 @@ class MachineFrameInfo {
   ///
   bool HasVarSizedObjects;
 
-  /// FrameAddressTaken - This boolean keeps track of whether there is a call
-  /// to builtin @llvm.frameaddress.
-  bool FrameAddressTaken;
-
   /// StackSize - The prolog/epilog code inserter calculates the final stack
   /// offsets for all of the fixed size objects, updating the Objects list
   /// above.  It then updates StackSize to contain the number of bytes that need
@@ -178,7 +174,6 @@ public:
   MachineFrameInfo(const TargetFrameInfo &tfi) : TFI(tfi) {
     StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0;
     HasVarSizedObjects = false;
-    FrameAddressTaken = false;
     HasCalls = false;
     MaxCallFrameSize = 0;
     MMI = 0;
@@ -195,12 +190,6 @@ public:
   ///
   bool hasVarSizedObjects() const { return HasVarSizedObjects; }
 
-  /// isFrameAddressTaken - This method may be called any time after instruction
-  /// selection is complete to determine if there is a call to
-  /// @llvm.frameaddress in this function.
-  bool isFrameAddressTaken() const { return FrameAddressTaken; }
-  void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; }
-
   /// getObjectIndexBegin - Return the minimum frame object index...
   ///
   int getObjectIndexBegin() const { return -NumFixedObjects; }
index bfda30ee194327f390485aa5e1d8569baaa9e659..76902505bc60ee315a022625231af0094b94f246 100644 (file)
@@ -3483,13 +3483,10 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
     setValue(&I, DAG.getNode(ISD::RETURNADDR, TLI.getPointerTy(),
                              getValue(I.getOperand(1))));
     return 0;
-  case Intrinsic::frameaddress: {
-    MachineFrameInfo *MFI = CurMBB->getParent()->getFrameInfo();
-    MFI->setFrameAddressIsTaken(true);
+  case Intrinsic::frameaddress:
     setValue(&I, DAG.getNode(ISD::FRAMEADDR, TLI.getPointerTy(),
                              getValue(I.getOperand(1))));
     return 0;
-  }
   case Intrinsic::setjmp:
     return "_setjmp"+!TLI.usesUnderscoreSetJmp();
     break;
index d598ef68f1d7fafd837c9c28287fbd3ffd7f2dbf..7787f43ff6163a0a9e65ed62ef42ee749fa5a99b 100644 (file)
@@ -209,9 +209,7 @@ ARMRegisterInfo::requiresRegisterScavenging(const MachineFunction &MF) const {
 /// or if frame pointer elimination is disabled.
 ///
 bool ARMRegisterInfo::hasFP(const MachineFunction &MF) const {
-  const MachineFrameInfo *MFI = MF.getFrameInfo();
-  return NoFramePointerElim || MFI->hasVarSizedObjects() ||
-    MFI->isFrameAddressTaken();
+  return NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects();
 }
 
 // hasReservedCallFrame - Under normal circumstances, when a frame pointer is
index 3cef5957df5ae373e07c4ff1d54be700c30911ce..dd8460a065672203339dd1f7ede5fc5a9174f47e 100644 (file)
@@ -104,7 +104,7 @@ BitVector AlphaRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
 //
 bool AlphaRegisterInfo::hasFP(const MachineFunction &MF) const {
   const MachineFrameInfo *MFI = MF.getFrameInfo();
-  return MFI->hasVarSizedObjects() || MFI->isFrameAddressTaken();
+  return MFI->hasVarSizedObjects();
 }
 
 void AlphaRegisterInfo::
index 18ca7033f600a2b2783d6901111cbe14c6448f91..882f79f7e189bcf197703ecfb90f3269364ff847 100644 (file)
@@ -294,8 +294,7 @@ BitVector SPURegisterInfo::getReservedRegs(const MachineFunction &MF) const {
 //
 static bool needsFP(const MachineFunction &MF) {
   const MachineFrameInfo *MFI = MF.getFrameInfo();
-  return NoFramePointerElim || MFI->hasVarSizedObjects() ||
-    MFI->isFrameAddressTaken();
+  return NoFramePointerElim || MFI->hasVarSizedObjects();
 }
 
 //--------------------------------------------------------------------------
index 0438de151fef737ecf261a6c89b74a69665e6d18..848eab8ed90761875c206f6ddc7989266f5401f2 100644 (file)
@@ -75,9 +75,7 @@ BitVector IA64RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
 // if frame pointer elimination is disabled.
 //
 bool IA64RegisterInfo::hasFP(const MachineFunction &MF) const {
-  const MachineFrameInfo *MFI = MF.getFrameInfo();
-  return NoFramePointerElim || MFI->hasVarSizedObjects() ||
-    MFI->isFrameAddressTaken();
+  return NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects();
 }
 
 void IA64RegisterInfo::
index f09d93e04d3596fb4ae59441028a45ff523d3a7e..6d75f460d34a43d2996999e950ddbe33d3123b14 100644 (file)
@@ -324,9 +324,7 @@ void MipsRegisterInfo::adjustMipsStackFrame(MachineFunction &MF) const
 // if frame pointer elimination is disabled.
 bool MipsRegisterInfo::
 hasFP(const MachineFunction &MF) const {
-  const MachineFrameInfo *MFI = MF.getFrameInfo();
-  return NoFramePointerElim || MFI->hasVarSizedObjects() ||
-    MFI->isFrameAddressTaken();
+  return (NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects());
 }
 
 // This function eliminate ADJCALLSTACKDOWN, 
index 155932d8d32610a7c0dc669efb5ca590f34e3ef5..014925e1a6dc89b3bc3fa37404b02c04b0ea7c3f 100644 (file)
@@ -333,7 +333,6 @@ PPCRegisterInfo::getCalleeSavedRegClasses(const MachineFunction *MF) const {
 static bool needsFP(const MachineFunction &MF) {
   const MachineFrameInfo *MFI = MF.getFrameInfo();
   return NoFramePointerElim || MFI->hasVarSizedObjects() ||
-    MFI->isFrameAddressTaken() ||
     (PerformTailCallOpt && MF.getInfo<PPCFunctionInfo>()->hasFastCall());
 }
 
index 1ef644d54d8e4075a5e3ba247de507101a030c1b..8e8a51a920ee5867f252cf82bde9c3f2ce6b4288 100644 (file)
@@ -5645,13 +5645,13 @@ SDValue X86TargetLowering::LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) {
 }
 
 SDValue X86TargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) {
-  unsigned Depth = cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue();
-  unsigned FrameReg = Subtarget->is64Bit() ? X86::RBP : X86::EBP;
-  SDValue FrameAddr = DAG.getRegister(FrameReg, getPointerTy());
-  while (Depth--)
-    FrameAddr = DAG.getLoad(getPointerTy(), DAG.getEntryNode(), FrameAddr,
-                            NULL, 0);
-  return FrameAddr;
+  // Depths > 0 not supported yet!
+  if (cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue() > 0)
+    return SDValue();
+
+  SDValue RetAddrFI = getReturnAddressFrameIndex(DAG);
+  return DAG.getNode(ISD::SUB, getPointerTy(), RetAddrFI,
+                     DAG.getIntPtrConstant(TD->getPointerSize()));
 }
 
 SDValue X86TargetLowering::LowerFRAME_TO_ARGS_OFFSET(SDValue Op,
index d618ffdeb78c43ab0c476052772c9958ad778868..49766a8fc74863d12bb73ad434cc2ee8ce300de1 100644 (file)
@@ -299,7 +299,6 @@ bool X86RegisterInfo::hasFP(const MachineFunction &MF) const {
   return (NoFramePointerElim ||
           needsStackRealignment(MF) ||
           MFI->hasVarSizedObjects() ||
-          MFI->isFrameAddressTaken() ||
           MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer() ||
           (MMI && MMI->callsUnwindInit()));
 }
index 80060996f32bd15348d0e0627778e509fefc4f28..86a238f6ab5657886abf95c93a4cd3f4f21b8c75 100644 (file)
@@ -1,6 +1,7 @@
-; RUN: llvm-as < %s | llc -march=x86-64 | grep movq | grep rbp
+; RUN: llvm-as < %s | llc -march=x86-64 | grep {leaq   -8(%rsp), %rax}
+@llvm.noinline = appending global [1 x i8*] [ i8* bitcast (i64* ()* @stack_end_address to i8*) ], section "llvm.metadata"
 
-define i64* @stack_end_address() nounwind  {
+define internal i64* @stack_end_address() nounwind  {
 entry:
        tail call i8* @llvm.frameaddress( i32 0 )
        bitcast i8* %0 to i64*
index b9d6d13880b55a6316f3c3434536cfe47312b983..0707d92d0980827698a9532c3101add90dc3b339 100644 (file)
@@ -1,4 +1,5 @@
 ; RUN: llvm-as < %s | llc -march=x86 | grep mov | grep ebp
+; XFAIL: *
 
 define i8* @t() nounwind {
 entry:
index f50ab072c33e3e3d7dcf85b124bf9d1f5bdd7a32..bcb87c549b722e514afab3fa465f74f4adbf3798 100644 (file)
@@ -1,4 +1,5 @@
 ; RUN: llvm-as < %s | llc -march=x86 | grep mov | count 3
+; XFAIL: *
 
 define i8* @t() nounwind {
 entry: