llvm.org GIT mirror llvm / fc448ff
convert a couple more places to use the new getStore() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114463 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
4 changed file(s) with 19 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
6363 /// getGOT - Return a MachinePointerInfo record that refers to a
6464 /// GOT entry.
6565 static MachinePointerInfo getGOT();
66
67 /// getStack - stack pointer relative access.
68 static MachinePointerInfo getStack(int64_t Offset);
6669 };
6770
6871
361361 return MachinePointerInfo(PseudoSourceValue::getGOT());
362362 }
363363
364 MachinePointerInfo MachinePointerInfo::getStack(int64_t Offset) {
365 return MachinePointerInfo(PseudoSourceValue::getStack(), Offset);
366 }
367
364368 MachineMemOperand::MachineMemOperand(MachinePointerInfo ptrinfo, unsigned f,
365369 uint64_t s, unsigned int a)
366370 : PtrInfo(ptrinfo), Size(s),
941941 unsigned LocMemOffset = VA.getLocMemOffset();
942942 SDValue PtrOff = DAG.getIntPtrConstant(LocMemOffset);
943943 PtrOff = DAG.getNode(ISD::ADD, dl, getPointerTy(), StackPtr, PtrOff);
944 if (Flags.isByVal()) {
944 if (Flags.isByVal())
945945 return CreateCopyOfByValArgument(Arg, PtrOff, Chain, Flags, DAG, dl);
946 }
946
947947 return DAG.getStore(Chain, dl, Arg, PtrOff,
948 PseudoSourceValue::getStack(), LocMemOffset,
948 MachinePointerInfo::getStack(LocMemOffset),
949949 false, false, 0);
950950 }
951951
18891889 EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
18901890 SDValue FR = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), PtrVT);
18911891 const Value *SV = cast(Op.getOperand(2))->getValue();
1892 return DAG.getStore(Op.getOperand(0), dl, FR, Op.getOperand(1), SV, 0,
1893 false, false, 0);
1892 return DAG.getStore(Op.getOperand(0), dl, FR, Op.getOperand(1),
1893 MachinePointerInfo(SV), false, false, 0);
18941894 }
18951895
18961896 SDValue
20832083 SDValue Val = DAG.getCopyFromReg(Chain, dl, VReg, MVT::i32);
20842084 SDValue Store =
20852085 DAG.getStore(Val.getValue(1), dl, Val, FIN,
2086 PseudoSourceValue::getFixedStack(AFI->getVarArgsFrameIndex()),
2087 0, false, false, 0);
2086 MachinePointerInfo::getFixedStack(AFI->getVarArgsFrameIndex()),
2087 false, false, 0);
20882088 MemOps.push_back(Store);
20892089 FIN = DAG.getNode(ISD::ADD, dl, getPointerTy(), FIN,
20902090 DAG.getConstant(4, getPointerTy()));
15381538
15391539 return DAG.getMemcpy(Chain, dl, Dst, Src, SizeNode, Flags.getByValAlign(),
15401540 /*isVolatile*/false, /*AlwaysInline=*/true,
1541 MachinePointerInfo(0), MachinePointerInfo(0));
1541 MachinePointerInfo(), MachinePointerInfo());
15421542 }
15431543
15441544 /// IsTailCallConvention - Return true if the calling convention is one that
18511851 unsigned LocMemOffset = FirstStackArgOffset + VA.getLocMemOffset();
18521852 SDValue PtrOff = DAG.getIntPtrConstant(LocMemOffset);
18531853 PtrOff = DAG.getNode(ISD::ADD, dl, getPointerTy(), StackPtr, PtrOff);
1854 if (Flags.isByVal()) {
1854 if (Flags.isByVal())
18551855 return CreateCopyOfByValArgument(Arg, PtrOff, Chain, Flags, DAG, dl);
1856 }
1857 return DAG.getStore(Chain, dl, Arg, PtrOff, MachinePointerInfo(),
1856
1857 return DAG.getStore(Chain, dl, Arg, PtrOff,
1858 MachinePointerInfo::getStack(LocMemOffset),
18581859 false, false, 0);
18591860 }
18601861