llvm.org GIT mirror llvm / d5d8191
Temporarily reverting r56683. This is causing a failure during the build of llvm-gcc: /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 Bill Wendling 11 years ago
13 changed file(s) with 18 addition(s) and 38 deletion(s). Raw diff Collapse all Expand all
117117 ///
118118 bool HasVarSizedObjects;
119119
120 /// FrameAddressTaken - This boolean keeps track of whether there is a call
121 /// to builtin @llvm.frameaddress.
122 bool FrameAddressTaken;
123
124120 /// StackSize - The prolog/epilog code inserter calculates the final stack
125121 /// offsets for all of the fixed size objects, updating the Objects list
126122 /// above. It then updates StackSize to contain the number of bytes that need
177173 MachineFrameInfo(const TargetFrameInfo &tfi) : TFI(tfi) {
178174 StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0;
179175 HasVarSizedObjects = false;
180 FrameAddressTaken = false;
181176 HasCalls = false;
182177 MaxCallFrameSize = 0;
183178 MMI = 0;
193188 /// contains any variable sized objects.
194189 ///
195190 bool hasVarSizedObjects() const { return HasVarSizedObjects; }
196
197 /// isFrameAddressTaken - This method may be called any time after instruction
198 /// selection is complete to determine if there is a call to
199 /// @llvm.frameaddress in this function.
200 bool isFrameAddressTaken() const { return FrameAddressTaken; }
201 void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; }
202191
203192 /// getObjectIndexBegin - Return the minimum frame object index...
204193 ///
34823482 setValue(&I, DAG.getNode(ISD::RETURNADDR, TLI.getPointerTy(),
34833483 getValue(I.getOperand(1))));
34843484 return 0;
3485 case Intrinsic::frameaddress: {
3486 MachineFrameInfo *MFI = CurMBB->getParent()->getFrameInfo();
3487 MFI->setFrameAddressIsTaken(true);
3485 case Intrinsic::frameaddress:
34883486 setValue(&I, DAG.getNode(ISD::FRAMEADDR, TLI.getPointerTy(),
34893487 getValue(I.getOperand(1))));
34903488 return 0;
3491 }
34923489 case Intrinsic::setjmp:
34933490 return "_setjmp"+!TLI.usesUnderscoreSetJmp();
34943491 break;
208208 /// or if frame pointer elimination is disabled.
209209 ///
210210 bool ARMRegisterInfo::hasFP(const MachineFunction &MF) const {
211 const MachineFrameInfo *MFI = MF.getFrameInfo();
212 return NoFramePointerElim || MFI->hasVarSizedObjects() ||
213 MFI->isFrameAddressTaken();
211 return NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects();
214212 }
215213
216214 // hasReservedCallFrame - Under normal circumstances, when a frame pointer is
103103 //
104104 bool AlphaRegisterInfo::hasFP(const MachineFunction &MF) const {
105105 const MachineFrameInfo *MFI = MF.getFrameInfo();
106 return MFI->hasVarSizedObjects() || MFI->isFrameAddressTaken();
106 return MFI->hasVarSizedObjects();
107107 }
108108
109109 void AlphaRegisterInfo::
293293 //
294294 static bool needsFP(const MachineFunction &MF) {
295295 const MachineFrameInfo *MFI = MF.getFrameInfo();
296 return NoFramePointerElim || MFI->hasVarSizedObjects() ||
297 MFI->isFrameAddressTaken();
296 return NoFramePointerElim || MFI->hasVarSizedObjects();
298297 }
299298
300299 //--------------------------------------------------------------------------
7474 // if frame pointer elimination is disabled.
7575 //
7676 bool IA64RegisterInfo::hasFP(const MachineFunction &MF) const {
77 const MachineFrameInfo *MFI = MF.getFrameInfo();
78 return NoFramePointerElim || MFI->hasVarSizedObjects() ||
79 MFI->isFrameAddressTaken();
77 return NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects();
8078 }
8179
8280 void IA64RegisterInfo::
323323 // if frame pointer elimination is disabled.
324324 bool MipsRegisterInfo::
325325 hasFP(const MachineFunction &MF) const {
326 const MachineFrameInfo *MFI = MF.getFrameInfo();
327 return NoFramePointerElim || MFI->hasVarSizedObjects() ||
328 MFI->isFrameAddressTaken();
326 return (NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects());
329327 }
330328
331329 // This function eliminate ADJCALLSTACKDOWN,
332332 static bool needsFP(const MachineFunction &MF) {
333333 const MachineFrameInfo *MFI = MF.getFrameInfo();
334334 return NoFramePointerElim || MFI->hasVarSizedObjects() ||
335 MFI->isFrameAddressTaken() ||
336335 (PerformTailCallOpt && MF.getInfo()->hasFastCall());
337336 }
338337
56445644 }
56455645
56465646 SDValue X86TargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) {
5647 unsigned Depth = cast(Op.getOperand(0))->getZExtValue();
5648 unsigned FrameReg = Subtarget->is64Bit() ? X86::RBP : X86::EBP;
5649 SDValue FrameAddr = DAG.getRegister(FrameReg, getPointerTy());
5650 while (Depth--)
5651 FrameAddr = DAG.getLoad(getPointerTy(), DAG.getEntryNode(), FrameAddr,
5652 NULL, 0);
5653 return FrameAddr;
5647 // Depths > 0 not supported yet!
5648 if (cast(Op.getOperand(0))->getZExtValue() > 0)
5649 return SDValue();
5650
5651 SDValue RetAddrFI = getReturnAddressFrameIndex(DAG);
5652 return DAG.getNode(ISD::SUB, getPointerTy(), RetAddrFI,
5653 DAG.getIntPtrConstant(TD->getPointerSize()));
56545654 }
56555655
56565656 SDValue X86TargetLowering::LowerFRAME_TO_ARGS_OFFSET(SDValue Op,
298298 return (NoFramePointerElim ||
299299 needsStackRealignment(MF) ||
300300 MFI->hasVarSizedObjects() ||
301 MFI->isFrameAddressTaken() ||
302301 MF.getInfo()->getForceFramePointer() ||
303302 (MMI && MMI->callsUnwindInit()));
304303 }
None ; RUN: llvm-as < %s | llc -march=x86-64 | grep movq | grep rbp
0 ; RUN: llvm-as < %s | llc -march=x86-64 | grep {leaq -8(%rsp), %rax}
1 @llvm.noinline = appending global [1 x i8*] [ i8* bitcast (i64* ()* @stack_end_address to i8*) ], section "llvm.metadata"
12
2 define i64* @stack_end_address() nounwind {
3 define internal i64* @stack_end_address() nounwind {
34 entry:
45 tail call i8* @llvm.frameaddress( i32 0 )
56 bitcast i8* %0 to i64*
0 ; RUN: llvm-as < %s | llc -march=x86 | grep mov | grep ebp
1 ; XFAIL: *
12
23 define i8* @t() nounwind {
34 entry:
0 ; RUN: llvm-as < %s | llc -march=x86 | grep mov | count 3
1 ; XFAIL: *
12
23 define i8* @t() nounwind {
34 entry: