mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
Revert 84315 for now. Re-thinking the patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84321 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bf125583f8
commit
6553155172
@ -47,9 +47,9 @@ namespace llvm {
|
|||||||
return V->getValueID() == PseudoSourceValueVal;
|
return V->getValueID() == PseudoSourceValueVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A pseudo source value referencing a stack frame entry,
|
/// A pseudo source value referencing a fixed stack frame entry,
|
||||||
/// e.g., a spill slot or an incoming argument on stack.
|
/// e.g., a spill slot.
|
||||||
static const PseudoSourceValue *getStackObject(int FI);
|
static const PseudoSourceValue *getFixedStack(int FI);
|
||||||
|
|
||||||
/// A pseudo source value referencing the area below the stack frame of
|
/// A pseudo source value referencing the area below the stack frame of
|
||||||
/// a function, e.g., the argument space.
|
/// a function, e.g., the argument space.
|
||||||
|
@ -52,31 +52,29 @@ void PseudoSourceValue::printCustom(raw_ostream &O) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
/// StackObjectPseudoSourceValue - A specialized PseudoSourceValue
|
/// FixedStackPseudoSourceValue - A specialized PseudoSourceValue
|
||||||
/// for holding StackObject values, which must include a frame
|
/// for holding FixedStack values, which must include a frame
|
||||||
/// index.
|
/// index.
|
||||||
class VISIBILITY_HIDDEN StackObjectPseudoSourceValue
|
class VISIBILITY_HIDDEN FixedStackPseudoSourceValue
|
||||||
: public PseudoSourceValue {
|
: public PseudoSourceValue {
|
||||||
const int FI;
|
const int FI;
|
||||||
public:
|
public:
|
||||||
explicit StackObjectPseudoSourceValue(int fi) : FI(fi) {}
|
explicit FixedStackPseudoSourceValue(int fi) : FI(fi) {}
|
||||||
|
|
||||||
virtual bool isConstant(const MachineFrameInfo *MFI) const;
|
virtual bool isConstant(const MachineFrameInfo *MFI) const;
|
||||||
|
|
||||||
virtual void printCustom(raw_ostream &OS) const {
|
virtual void printCustom(raw_ostream &OS) const {
|
||||||
if (FI < 0)
|
OS << "FixedStack" << FI;
|
||||||
OS << "Fixed";
|
|
||||||
OS << "StackObject" << FI;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static ManagedStatic<std::map<int, const PseudoSourceValue *> > FSValues;
|
static ManagedStatic<std::map<int, const PseudoSourceValue *> > FSValues;
|
||||||
|
|
||||||
const PseudoSourceValue *PseudoSourceValue::getStackObject(int FI) {
|
const PseudoSourceValue *PseudoSourceValue::getFixedStack(int FI) {
|
||||||
const PseudoSourceValue *&V = (*FSValues)[FI];
|
const PseudoSourceValue *&V = (*FSValues)[FI];
|
||||||
if (!V)
|
if (!V)
|
||||||
V = new StackObjectPseudoSourceValue(FI);
|
V = new FixedStackPseudoSourceValue(FI);
|
||||||
return V;
|
return V;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +89,6 @@ bool PseudoSourceValue::isConstant(const MachineFrameInfo *) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool FixedStackPseudoSourceValue::isConstant(const MachineFrameInfo *MFI) const{
|
||||||
StackObjectPseudoSourceValue::isConstant(const MachineFrameInfo *MFI) const {
|
|
||||||
return MFI && MFI->isImmutableObjectIndex(FI);
|
return MFI && MFI->isImmutableObjectIndex(FI);
|
||||||
}
|
}
|
||||||
|
@ -643,7 +643,7 @@ PerformInsertVectorEltInMemory(SDValue Vec, SDValue Val, SDValue Idx,
|
|||||||
|
|
||||||
// Store the vector.
|
// Store the vector.
|
||||||
SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Tmp1, StackPtr,
|
SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Tmp1, StackPtr,
|
||||||
PseudoSourceValue::getStackObject(SPFI), 0);
|
PseudoSourceValue::getFixedStack(SPFI), 0);
|
||||||
|
|
||||||
// Truncate or zero extend offset to target pointer type.
|
// Truncate or zero extend offset to target pointer type.
|
||||||
unsigned CastOpc = IdxVT.bitsGT(PtrVT) ? ISD::TRUNCATE : ISD::ZERO_EXTEND;
|
unsigned CastOpc = IdxVT.bitsGT(PtrVT) ? ISD::TRUNCATE : ISD::ZERO_EXTEND;
|
||||||
@ -654,10 +654,10 @@ PerformInsertVectorEltInMemory(SDValue Vec, SDValue Val, SDValue Idx,
|
|||||||
SDValue StackPtr2 = DAG.getNode(ISD::ADD, dl, IdxVT, Tmp3, StackPtr);
|
SDValue StackPtr2 = DAG.getNode(ISD::ADD, dl, IdxVT, Tmp3, StackPtr);
|
||||||
// Store the scalar value.
|
// Store the scalar value.
|
||||||
Ch = DAG.getTruncStore(Ch, dl, Tmp2, StackPtr2,
|
Ch = DAG.getTruncStore(Ch, dl, Tmp2, StackPtr2,
|
||||||
PseudoSourceValue::getStackObject(SPFI), 0, EltVT);
|
PseudoSourceValue::getFixedStack(SPFI), 0, EltVT);
|
||||||
// Load the updated vector.
|
// Load the updated vector.
|
||||||
return DAG.getLoad(VT, dl, Ch, StackPtr,
|
return DAG.getLoad(VT, dl, Ch, StackPtr,
|
||||||
PseudoSourceValue::getStackObject(SPFI), 0);
|
PseudoSourceValue::getFixedStack(SPFI), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1518,7 +1518,7 @@ SDValue SelectionDAGLegalize::ExpandVectorBuildThroughStack(SDNode* Node) {
|
|||||||
DebugLoc dl = Node->getDebugLoc();
|
DebugLoc dl = Node->getDebugLoc();
|
||||||
SDValue FIPtr = DAG.CreateStackTemporary(VT);
|
SDValue FIPtr = DAG.CreateStackTemporary(VT);
|
||||||
int FI = cast<FrameIndexSDNode>(FIPtr.getNode())->getIndex();
|
int FI = cast<FrameIndexSDNode>(FIPtr.getNode())->getIndex();
|
||||||
const Value *SV = PseudoSourceValue::getStackObject(FI);
|
const Value *SV = PseudoSourceValue::getFixedStack(FI);
|
||||||
|
|
||||||
// Emit a store of each element to the stack slot.
|
// Emit a store of each element to the stack slot.
|
||||||
SmallVector<SDValue, 8> Stores;
|
SmallVector<SDValue, 8> Stores;
|
||||||
@ -1714,7 +1714,7 @@ SDValue SelectionDAGLegalize::EmitStackConvert(SDValue SrcOp,
|
|||||||
|
|
||||||
FrameIndexSDNode *StackPtrFI = cast<FrameIndexSDNode>(FIPtr);
|
FrameIndexSDNode *StackPtrFI = cast<FrameIndexSDNode>(FIPtr);
|
||||||
int SPFI = StackPtrFI->getIndex();
|
int SPFI = StackPtrFI->getIndex();
|
||||||
const Value *SV = PseudoSourceValue::getStackObject(SPFI);
|
const Value *SV = PseudoSourceValue::getFixedStack(SPFI);
|
||||||
|
|
||||||
unsigned SrcSize = SrcOp.getValueType().getSizeInBits();
|
unsigned SrcSize = SrcOp.getValueType().getSizeInBits();
|
||||||
unsigned SlotSize = SlotVT.getSizeInBits();
|
unsigned SlotSize = SlotVT.getSizeInBits();
|
||||||
@ -1755,10 +1755,10 @@ SDValue SelectionDAGLegalize::ExpandSCALAR_TO_VECTOR(SDNode *Node) {
|
|||||||
|
|
||||||
SDValue Ch = DAG.getTruncStore(DAG.getEntryNode(), dl, Node->getOperand(0),
|
SDValue Ch = DAG.getTruncStore(DAG.getEntryNode(), dl, Node->getOperand(0),
|
||||||
StackPtr,
|
StackPtr,
|
||||||
PseudoSourceValue::getStackObject(SPFI), 0,
|
PseudoSourceValue::getFixedStack(SPFI), 0,
|
||||||
Node->getValueType(0).getVectorElementType());
|
Node->getValueType(0).getVectorElementType());
|
||||||
return DAG.getLoad(Node->getValueType(0), dl, Ch, StackPtr,
|
return DAG.getLoad(Node->getValueType(0), dl, Ch, StackPtr,
|
||||||
PseudoSourceValue::getStackObject(SPFI), 0);
|
PseudoSourceValue::getFixedStack(SPFI), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ void DAGTypeLegalizer::ExpandRes_BIT_CONVERT(SDNode *N, SDValue &Lo,
|
|||||||
getTypeForEVT(*DAG.getContext()));
|
getTypeForEVT(*DAG.getContext()));
|
||||||
SDValue StackPtr = DAG.CreateStackTemporary(InVT, Alignment);
|
SDValue StackPtr = DAG.CreateStackTemporary(InVT, Alignment);
|
||||||
int SPFI = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
|
int SPFI = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
|
||||||
const Value *SV = PseudoSourceValue::getStackObject(SPFI);
|
const Value *SV = PseudoSourceValue::getFixedStack(SPFI);
|
||||||
|
|
||||||
// Emit a store to the stack slot.
|
// Emit a store to the stack slot.
|
||||||
SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, InOp, StackPtr, SV, 0);
|
SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, InOp, StackPtr, SV, 0);
|
||||||
|
@ -1058,7 +1058,7 @@ SDValue DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT(SDNode *N) {
|
|||||||
DebugLoc dl = N->getDebugLoc();
|
DebugLoc dl = N->getDebugLoc();
|
||||||
SDValue StackPtr = DAG.CreateStackTemporary(VecVT);
|
SDValue StackPtr = DAG.CreateStackTemporary(VecVT);
|
||||||
int SPFI = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
|
int SPFI = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
|
||||||
const Value *SV = PseudoSourceValue::getStackObject(SPFI);
|
const Value *SV = PseudoSourceValue::getFixedStack(SPFI);
|
||||||
SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, SV, 0);
|
SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, SV, 0);
|
||||||
|
|
||||||
// Load back the required element.
|
// Load back the required element.
|
||||||
|
@ -3514,7 +3514,7 @@ SDValue SelectionDAG::getAtomic(unsigned Opcode, DebugLoc dl, EVT MemVT,
|
|||||||
if (!PtrVal)
|
if (!PtrVal)
|
||||||
if (const FrameIndexSDNode *FI =
|
if (const FrameIndexSDNode *FI =
|
||||||
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
||||||
PtrVal = PseudoSourceValue::getStackObject(FI->getIndex());
|
PtrVal = PseudoSourceValue::getFixedStack(FI->getIndex());
|
||||||
|
|
||||||
MachineFunction &MF = getMachineFunction();
|
MachineFunction &MF = getMachineFunction();
|
||||||
unsigned Flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
unsigned Flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
||||||
@ -3567,7 +3567,7 @@ SDValue SelectionDAG::getAtomic(unsigned Opcode, DebugLoc dl, EVT MemVT,
|
|||||||
if (!PtrVal)
|
if (!PtrVal)
|
||||||
if (const FrameIndexSDNode *FI =
|
if (const FrameIndexSDNode *FI =
|
||||||
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
||||||
PtrVal = PseudoSourceValue::getStackObject(FI->getIndex());
|
PtrVal = PseudoSourceValue::getFixedStack(FI->getIndex());
|
||||||
|
|
||||||
MachineFunction &MF = getMachineFunction();
|
MachineFunction &MF = getMachineFunction();
|
||||||
unsigned Flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
unsigned Flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
||||||
@ -3714,7 +3714,7 @@ SelectionDAG::getLoad(ISD::MemIndexedMode AM, DebugLoc dl,
|
|||||||
if (!SV)
|
if (!SV)
|
||||||
if (const FrameIndexSDNode *FI =
|
if (const FrameIndexSDNode *FI =
|
||||||
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
||||||
SV = PseudoSourceValue::getStackObject(FI->getIndex());
|
SV = PseudoSourceValue::getFixedStack(FI->getIndex());
|
||||||
|
|
||||||
MachineFunction &MF = getMachineFunction();
|
MachineFunction &MF = getMachineFunction();
|
||||||
unsigned Flags = MachineMemOperand::MOLoad;
|
unsigned Flags = MachineMemOperand::MOLoad;
|
||||||
@ -3813,7 +3813,7 @@ SDValue SelectionDAG::getStore(SDValue Chain, DebugLoc dl, SDValue Val,
|
|||||||
if (!SV)
|
if (!SV)
|
||||||
if (const FrameIndexSDNode *FI =
|
if (const FrameIndexSDNode *FI =
|
||||||
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
||||||
SV = PseudoSourceValue::getStackObject(FI->getIndex());
|
SV = PseudoSourceValue::getFixedStack(FI->getIndex());
|
||||||
|
|
||||||
MachineFunction &MF = getMachineFunction();
|
MachineFunction &MF = getMachineFunction();
|
||||||
unsigned Flags = MachineMemOperand::MOStore;
|
unsigned Flags = MachineMemOperand::MOStore;
|
||||||
@ -3859,7 +3859,7 @@ SDValue SelectionDAG::getTruncStore(SDValue Chain, DebugLoc dl, SDValue Val,
|
|||||||
if (!SV)
|
if (!SV)
|
||||||
if (const FrameIndexSDNode *FI =
|
if (const FrameIndexSDNode *FI =
|
||||||
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
||||||
SV = PseudoSourceValue::getStackObject(FI->getIndex());
|
SV = PseudoSourceValue::getFixedStack(FI->getIndex());
|
||||||
|
|
||||||
MachineFunction &MF = getMachineFunction();
|
MachineFunction &MF = getMachineFunction();
|
||||||
unsigned Flags = MachineMemOperand::MOStore;
|
unsigned Flags = MachineMemOperand::MOStore;
|
||||||
|
@ -4197,7 +4197,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
|
|
||||||
// Store the stack protector onto the stack.
|
// Store the stack protector onto the stack.
|
||||||
SDValue Result = DAG.getStore(getRoot(), getCurDebugLoc(), Src, FIN,
|
SDValue Result = DAG.getStore(getRoot(), getCurDebugLoc(), Src, FIN,
|
||||||
PseudoSourceValue::getStackObject(FI),
|
PseudoSourceValue::getFixedStack(FI),
|
||||||
0, true);
|
0, true);
|
||||||
setValue(&I, Result);
|
setValue(&I, Result);
|
||||||
DAG.setRoot(Result);
|
DAG.setRoot(Result);
|
||||||
|
@ -466,8 +466,8 @@ void StackSlotColoring::RewriteInstruction(MachineInstr *MI, int OldFI,
|
|||||||
// Update the memory references. This changes the MachineMemOperands
|
// Update the memory references. This changes the MachineMemOperands
|
||||||
// directly. They may be in use by multiple instructions, however all
|
// directly. They may be in use by multiple instructions, however all
|
||||||
// instructions using OldFI are being rewritten to use NewFI.
|
// instructions using OldFI are being rewritten to use NewFI.
|
||||||
const Value *OldSV = PseudoSourceValue::getStackObject(OldFI);
|
const Value *OldSV = PseudoSourceValue::getFixedStack(OldFI);
|
||||||
const Value *NewSV = PseudoSourceValue::getStackObject(NewFI);
|
const Value *NewSV = PseudoSourceValue::getFixedStack(NewFI);
|
||||||
for (MachineInstr::mmo_iterator I = MI->memoperands_begin(),
|
for (MachineInstr::mmo_iterator I = MI->memoperands_begin(),
|
||||||
E = MI->memoperands_end(); I != E; ++I)
|
E = MI->memoperands_end(); I != E; ++I)
|
||||||
if ((*I)->getValue() == OldSV)
|
if ((*I)->getValue() == OldSV)
|
||||||
|
@ -187,7 +187,7 @@ TargetInstrInfo::foldMemoryOperand(MachineFunction &MF,
|
|||||||
const MachineFrameInfo &MFI = *MF.getFrameInfo();
|
const MachineFrameInfo &MFI = *MF.getFrameInfo();
|
||||||
assert(MFI.getObjectOffset(FrameIndex) != -1);
|
assert(MFI.getObjectOffset(FrameIndex) != -1);
|
||||||
MachineMemOperand *MMO =
|
MachineMemOperand *MMO =
|
||||||
MF.getMachineMemOperand(PseudoSourceValue::getStackObject(FrameIndex),
|
MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FrameIndex),
|
||||||
Flags, /*Offset=*/0,
|
Flags, /*Offset=*/0,
|
||||||
MFI.getObjectSize(FrameIndex),
|
MFI.getObjectSize(FrameIndex),
|
||||||
MFI.getObjectAlignment(FrameIndex));
|
MFI.getObjectAlignment(FrameIndex));
|
||||||
|
@ -671,7 +671,7 @@ storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
|||||||
MachineFrameInfo &MFI = *MF.getFrameInfo();
|
MachineFrameInfo &MFI = *MF.getFrameInfo();
|
||||||
|
|
||||||
MachineMemOperand *MMO =
|
MachineMemOperand *MMO =
|
||||||
MF.getMachineMemOperand(PseudoSourceValue::getStackObject(FI),
|
MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FI),
|
||||||
MachineMemOperand::MOStore, 0,
|
MachineMemOperand::MOStore, 0,
|
||||||
MFI.getObjectSize(FI),
|
MFI.getObjectSize(FI),
|
||||||
MFI.getObjectAlignment(FI));
|
MFI.getObjectAlignment(FI));
|
||||||
@ -709,7 +709,7 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
|||||||
MachineFrameInfo &MFI = *MF.getFrameInfo();
|
MachineFrameInfo &MFI = *MF.getFrameInfo();
|
||||||
|
|
||||||
MachineMemOperand *MMO =
|
MachineMemOperand *MMO =
|
||||||
MF.getMachineMemOperand(PseudoSourceValue::getStackObject(FI),
|
MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FI),
|
||||||
MachineMemOperand::MOLoad, 0,
|
MachineMemOperand::MOLoad, 0,
|
||||||
MFI.getObjectSize(FI),
|
MFI.getObjectSize(FI),
|
||||||
MFI.getObjectAlignment(FI));
|
MFI.getObjectAlignment(FI));
|
||||||
|
@ -309,7 +309,7 @@ MSP430TargetLowering::LowerCCCArguments(SDValue Chain,
|
|||||||
//from this parameter
|
//from this parameter
|
||||||
SDValue FIN = DAG.getFrameIndex(FI, MVT::i16);
|
SDValue FIN = DAG.getFrameIndex(FI, MVT::i16);
|
||||||
InVals.push_back(DAG.getLoad(VA.getLocVT(), dl, Chain, FIN,
|
InVals.push_back(DAG.getLoad(VA.getLocVT(), dl, Chain, FIN,
|
||||||
PseudoSourceValue::getStackObject(FI), 0));
|
PseudoSourceValue::getFixedStack(FI), 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2235,7 +2235,7 @@ StoreTailCallArgumentsToStackSlot(SelectionDAG &DAG,
|
|||||||
int FI = TailCallArgs[i].FrameIdx;
|
int FI = TailCallArgs[i].FrameIdx;
|
||||||
// Store relative to framepointer.
|
// Store relative to framepointer.
|
||||||
MemOpChains.push_back(DAG.getStore(Chain, dl, Arg, FIN,
|
MemOpChains.push_back(DAG.getStore(Chain, dl, Arg, FIN,
|
||||||
PseudoSourceValue::getStackObject(FI),
|
PseudoSourceValue::getFixedStack(FI),
|
||||||
0));
|
0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2261,7 +2261,7 @@ static SDValue EmitTailCallStoreFPAndRetAddr(SelectionDAG &DAG,
|
|||||||
EVT VT = isPPC64 ? MVT::i64 : MVT::i32;
|
EVT VT = isPPC64 ? MVT::i64 : MVT::i32;
|
||||||
SDValue NewRetAddrFrIdx = DAG.getFrameIndex(NewRetAddr, VT);
|
SDValue NewRetAddrFrIdx = DAG.getFrameIndex(NewRetAddr, VT);
|
||||||
Chain = DAG.getStore(Chain, dl, OldRetAddr, NewRetAddrFrIdx,
|
Chain = DAG.getStore(Chain, dl, OldRetAddr, NewRetAddrFrIdx,
|
||||||
PseudoSourceValue::getStackObject(NewRetAddr), 0);
|
PseudoSourceValue::getFixedStack(NewRetAddr), 0);
|
||||||
|
|
||||||
// When using the 32/64-bit SVR4 ABI there is no need to move the FP stack
|
// When using the 32/64-bit SVR4 ABI there is no need to move the FP stack
|
||||||
// slot as the FP is never overwritten.
|
// slot as the FP is never overwritten.
|
||||||
@ -2271,7 +2271,7 @@ static SDValue EmitTailCallStoreFPAndRetAddr(SelectionDAG &DAG,
|
|||||||
int NewFPIdx = MF.getFrameInfo()->CreateFixedObject(SlotSize, NewFPLoc);
|
int NewFPIdx = MF.getFrameInfo()->CreateFixedObject(SlotSize, NewFPLoc);
|
||||||
SDValue NewFramePtrIdx = DAG.getFrameIndex(NewFPIdx, VT);
|
SDValue NewFramePtrIdx = DAG.getFrameIndex(NewFPIdx, VT);
|
||||||
Chain = DAG.getStore(Chain, dl, OldFP, NewFramePtrIdx,
|
Chain = DAG.getStore(Chain, dl, OldFP, NewFramePtrIdx,
|
||||||
PseudoSourceValue::getStackObject(NewFPIdx), 0);
|
PseudoSourceValue::getFixedStack(NewFPIdx), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Chain;
|
return Chain;
|
||||||
@ -3388,7 +3388,7 @@ SDValue PPCTargetLowering::LowerSINT_TO_FP(SDValue Op, SelectionDAG &DAG) {
|
|||||||
|
|
||||||
// STD the extended value into the stack slot.
|
// STD the extended value into the stack slot.
|
||||||
MachineMemOperand *MMO =
|
MachineMemOperand *MMO =
|
||||||
MF.getMachineMemOperand(PseudoSourceValue::getStackObject(FrameIdx),
|
MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FrameIdx),
|
||||||
MachineMemOperand::MOStore, 0, 8, 8);
|
MachineMemOperand::MOStore, 0, 8, 8);
|
||||||
SDValue Ops[] = { DAG.getEntryNode(), Ext64, FIdx };
|
SDValue Ops[] = { DAG.getEntryNode(), Ext64, FIdx };
|
||||||
SDValue Store =
|
SDValue Store =
|
||||||
|
@ -322,7 +322,7 @@ SystemZTargetLowering::LowerCCCArguments(SDValue Chain,
|
|||||||
// from this parameter
|
// from this parameter
|
||||||
SDValue FIN = DAG.getFrameIndex(FI, getPointerTy());
|
SDValue FIN = DAG.getFrameIndex(FI, getPointerTy());
|
||||||
ArgValue = DAG.getLoad(LocVT, dl, Chain, FIN,
|
ArgValue = DAG.getLoad(LocVT, dl, Chain, FIN,
|
||||||
PseudoSourceValue::getStackObject(FI), 0);
|
PseudoSourceValue::getFixedStack(FI), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is an 8/16/32-bit value, it is really passed promoted to 64
|
// If this is an 8/16/32-bit value, it is really passed promoted to 64
|
||||||
|
@ -115,7 +115,7 @@ addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0) {
|
|||||||
if (TID.mayStore())
|
if (TID.mayStore())
|
||||||
Flags |= MachineMemOperand::MOStore;
|
Flags |= MachineMemOperand::MOStore;
|
||||||
MachineMemOperand *MMO =
|
MachineMemOperand *MMO =
|
||||||
MF.getMachineMemOperand(PseudoSourceValue::getStackObject(FI),
|
MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FI),
|
||||||
Flags, Offset,
|
Flags, Offset,
|
||||||
MFI.getObjectSize(FI),
|
MFI.getObjectSize(FI),
|
||||||
MFI.getObjectAlignment(FI));
|
MFI.getObjectAlignment(FI));
|
||||||
|
@ -1373,7 +1373,7 @@ X86TargetLowering::LowerMemArgument(SDValue Chain,
|
|||||||
if (Flags.isByVal())
|
if (Flags.isByVal())
|
||||||
return FIN;
|
return FIN;
|
||||||
return DAG.getLoad(ValVT, dl, Chain, FIN,
|
return DAG.getLoad(ValVT, dl, Chain, FIN,
|
||||||
PseudoSourceValue::getStackObject(FI), 0);
|
PseudoSourceValue::getFixedStack(FI), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDValue
|
SDValue
|
||||||
@ -1562,7 +1562,7 @@ X86TargetLowering::LowerFormalArguments(SDValue Chain,
|
|||||||
SDValue Val = DAG.getCopyFromReg(Chain, dl, VReg, MVT::i64);
|
SDValue Val = DAG.getCopyFromReg(Chain, dl, VReg, MVT::i64);
|
||||||
SDValue Store =
|
SDValue Store =
|
||||||
DAG.getStore(Val.getValue(1), dl, Val, FIN,
|
DAG.getStore(Val.getValue(1), dl, Val, FIN,
|
||||||
PseudoSourceValue::getStackObject(RegSaveFrameIndex),
|
PseudoSourceValue::getFixedStack(RegSaveFrameIndex),
|
||||||
Offset);
|
Offset);
|
||||||
MemOps.push_back(Store);
|
MemOps.push_back(Store);
|
||||||
Offset += 8;
|
Offset += 8;
|
||||||
@ -1673,7 +1673,7 @@ EmitTailCallStoreRetAddr(SelectionDAG & DAG, MachineFunction &MF,
|
|||||||
EVT VT = Is64Bit ? MVT::i64 : MVT::i32;
|
EVT VT = Is64Bit ? MVT::i64 : MVT::i32;
|
||||||
SDValue NewRetAddrFrIdx = DAG.getFrameIndex(NewReturnAddrFI, VT);
|
SDValue NewRetAddrFrIdx = DAG.getFrameIndex(NewReturnAddrFI, VT);
|
||||||
Chain = DAG.getStore(Chain, dl, RetAddrFrIdx, NewRetAddrFrIdx,
|
Chain = DAG.getStore(Chain, dl, RetAddrFrIdx, NewRetAddrFrIdx,
|
||||||
PseudoSourceValue::getStackObject(NewReturnAddrFI), 0);
|
PseudoSourceValue::getFixedStack(NewReturnAddrFI), 0);
|
||||||
return Chain;
|
return Chain;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1767,7 +1767,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
|
|||||||
SDValue SpillSlot = DAG.CreateStackTemporary(VA.getValVT());
|
SDValue SpillSlot = DAG.CreateStackTemporary(VA.getValVT());
|
||||||
int FI = cast<FrameIndexSDNode>(SpillSlot)->getIndex();
|
int FI = cast<FrameIndexSDNode>(SpillSlot)->getIndex();
|
||||||
Chain = DAG.getStore(Chain, dl, Arg, SpillSlot,
|
Chain = DAG.getStore(Chain, dl, Arg, SpillSlot,
|
||||||
PseudoSourceValue::getStackObject(FI), 0);
|
PseudoSourceValue::getFixedStack(FI), 0);
|
||||||
Arg = SpillSlot;
|
Arg = SpillSlot;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1900,7 +1900,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
|
|||||||
// Store relative to framepointer.
|
// Store relative to framepointer.
|
||||||
MemOpChains2.push_back(
|
MemOpChains2.push_back(
|
||||||
DAG.getStore(ArgChain, dl, Arg, FIN,
|
DAG.getStore(ArgChain, dl, Arg, FIN,
|
||||||
PseudoSourceValue::getStackObject(FI), 0));
|
PseudoSourceValue::getFixedStack(FI), 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4868,7 +4868,7 @@ SDValue X86TargetLowering::LowerSINT_TO_FP(SDValue Op, SelectionDAG &DAG) {
|
|||||||
SDValue StackSlot = DAG.getFrameIndex(SSFI, getPointerTy());
|
SDValue StackSlot = DAG.getFrameIndex(SSFI, getPointerTy());
|
||||||
SDValue Chain = DAG.getStore(DAG.getEntryNode(), dl, Op.getOperand(0),
|
SDValue Chain = DAG.getStore(DAG.getEntryNode(), dl, Op.getOperand(0),
|
||||||
StackSlot,
|
StackSlot,
|
||||||
PseudoSourceValue::getStackObject(SSFI), 0);
|
PseudoSourceValue::getFixedStack(SSFI), 0);
|
||||||
return BuildFILD(Op, SrcVT, Chain, StackSlot, DAG);
|
return BuildFILD(Op, SrcVT, Chain, StackSlot, DAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4909,7 +4909,7 @@ SDValue X86TargetLowering::BuildFILD(SDValue Op, EVT SrcVT, SDValue Chain,
|
|||||||
Ops.push_back(InFlag);
|
Ops.push_back(InFlag);
|
||||||
Chain = DAG.getNode(X86ISD::FST, dl, Tys, &Ops[0], Ops.size());
|
Chain = DAG.getNode(X86ISD::FST, dl, Tys, &Ops[0], Ops.size());
|
||||||
Result = DAG.getLoad(Op.getValueType(), dl, Chain, StackSlot,
|
Result = DAG.getLoad(Op.getValueType(), dl, Chain, StackSlot,
|
||||||
PseudoSourceValue::getStackObject(SSFI), 0);
|
PseudoSourceValue::getFixedStack(SSFI), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
@ -5124,7 +5124,7 @@ FP_TO_INTHelper(SDValue Op, SelectionDAG &DAG, bool IsSigned) {
|
|||||||
if (isScalarFPTypeInSSEReg(Op.getOperand(0).getValueType())) {
|
if (isScalarFPTypeInSSEReg(Op.getOperand(0).getValueType())) {
|
||||||
assert(DstTy == MVT::i64 && "Invalid FP_TO_SINT to lower!");
|
assert(DstTy == MVT::i64 && "Invalid FP_TO_SINT to lower!");
|
||||||
Chain = DAG.getStore(Chain, dl, Value, StackSlot,
|
Chain = DAG.getStore(Chain, dl, Value, StackSlot,
|
||||||
PseudoSourceValue::getStackObject(SSFI), 0);
|
PseudoSourceValue::getFixedStack(SSFI), 0);
|
||||||
SDVTList Tys = DAG.getVTList(Op.getOperand(0).getValueType(), MVT::Other);
|
SDVTList Tys = DAG.getVTList(Op.getOperand(0).getValueType(), MVT::Other);
|
||||||
SDValue Ops[] = {
|
SDValue Ops[] = {
|
||||||
Chain, StackSlot, DAG.getValueType(Op.getOperand(0).getValueType())
|
Chain, StackSlot, DAG.getValueType(Op.getOperand(0).getValueType())
|
||||||
@ -7754,7 +7754,7 @@ X86TargetLowering::EmitVAStartSaveXMMRegsWithCustomInserter(
|
|||||||
int64_t Offset = (i - 3) * 16 + VarArgsFPOffset;
|
int64_t Offset = (i - 3) * 16 + VarArgsFPOffset;
|
||||||
MachineMemOperand *MMO =
|
MachineMemOperand *MMO =
|
||||||
F->getMachineMemOperand(
|
F->getMachineMemOperand(
|
||||||
PseudoSourceValue::getStackObject(RegSaveFrameIndex),
|
PseudoSourceValue::getFixedStack(RegSaveFrameIndex),
|
||||||
MachineMemOperand::MOStore, Offset,
|
MachineMemOperand::MOStore, Offset,
|
||||||
/*Size=*/16, /*Align=*/16);
|
/*Size=*/16, /*Align=*/16);
|
||||||
BuildMI(XMMSaveMBB, DL, TII->get(X86::MOVAPSmr))
|
BuildMI(XMMSaveMBB, DL, TII->get(X86::MOVAPSmr))
|
||||||
|
@ -144,7 +144,7 @@ addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0) {
|
|||||||
if (TID.mayStore())
|
if (TID.mayStore())
|
||||||
Flags |= MachineMemOperand::MOStore;
|
Flags |= MachineMemOperand::MOStore;
|
||||||
MachineMemOperand *MMO =
|
MachineMemOperand *MMO =
|
||||||
MF.getMachineMemOperand(PseudoSourceValue::getStackObject(FI),
|
MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FI),
|
||||||
Flags, Offset,
|
Flags, Offset,
|
||||||
MFI.getObjectSize(FI),
|
MFI.getObjectSize(FI),
|
||||||
MFI.getObjectAlignment(FI));
|
MFI.getObjectAlignment(FI));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user