mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 08:29:43 +00:00
chagne interface to SelectionDAG::getAtomic to take a MachinePointerInfo,
eliminating some weird "infer a frame address" logic which was dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114396 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0531356e4d
commit
60bddc8bcd
@ -587,8 +587,8 @@ public:
|
||||
/// getAtomic - Gets a node for an atomic op, produces result and chain and
|
||||
/// takes 3 operands
|
||||
SDValue getAtomic(unsigned Opcode, DebugLoc dl, EVT MemVT, SDValue Chain,
|
||||
SDValue Ptr, SDValue Cmp, SDValue Swp, const Value* PtrVal,
|
||||
unsigned Alignment=0);
|
||||
SDValue Ptr, SDValue Cmp, SDValue Swp,
|
||||
MachinePointerInfo PtrInfo, unsigned Alignment=0);
|
||||
SDValue getAtomic(unsigned Opcode, DebugLoc dl, EVT MemVT, SDValue Chain,
|
||||
SDValue Ptr, SDValue Cmp, SDValue Swp,
|
||||
MachineMemOperand *MMO);
|
||||
|
@ -3669,19 +3669,12 @@ SDValue SelectionDAG::getMemset(SDValue Chain, DebugLoc dl, SDValue Dst,
|
||||
}
|
||||
|
||||
SDValue SelectionDAG::getAtomic(unsigned Opcode, DebugLoc dl, EVT MemVT,
|
||||
SDValue Chain,
|
||||
SDValue Ptr, SDValue Cmp,
|
||||
SDValue Swp, const Value *PtrVal,
|
||||
SDValue Chain, SDValue Ptr, SDValue Cmp,
|
||||
SDValue Swp, MachinePointerInfo PtrInfo,
|
||||
unsigned Alignment) {
|
||||
if (Alignment == 0) // Ensure that codegen never sees alignment 0
|
||||
Alignment = getEVTAlignment(MemVT);
|
||||
|
||||
// Check if the memory reference references a frame index
|
||||
if (!PtrVal)
|
||||
if (const FrameIndexSDNode *FI =
|
||||
dyn_cast<const FrameIndexSDNode>(Ptr.getNode()))
|
||||
PtrVal = PseudoSourceValue::getFixedStack(FI->getIndex());
|
||||
|
||||
MachineFunction &MF = getMachineFunction();
|
||||
unsigned Flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore;
|
||||
|
||||
@ -3689,8 +3682,7 @@ SDValue SelectionDAG::getAtomic(unsigned Opcode, DebugLoc dl, EVT MemVT,
|
||||
Flags |= MachineMemOperand::MOVolatile;
|
||||
|
||||
MachineMemOperand *MMO =
|
||||
MF.getMachineMemOperand(MachinePointerInfo(PtrVal), Flags,
|
||||
MemVT.getStoreSize(), Alignment);
|
||||
MF.getMachineMemOperand(PtrInfo, Flags, MemVT.getStoreSize(), Alignment);
|
||||
|
||||
return getAtomic(Opcode, dl, MemVT, Chain, Ptr, Cmp, Swp, MMO);
|
||||
}
|
||||
|
@ -4550,7 +4550,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
getValue(I.getArgOperand(0)),
|
||||
getValue(I.getArgOperand(1)),
|
||||
getValue(I.getArgOperand(2)),
|
||||
I.getArgOperand(0));
|
||||
MachinePointerInfo(I.getArgOperand(0)));
|
||||
setValue(&I, L);
|
||||
DAG.setRoot(L.getValue(1));
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user