summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-07 19:35:22 +0000
committerDan Gohman <gohman@apple.com>2008-04-07 19:35:22 +0000
commit3bc3ddd638b3d90da4f0f59cad8c712ee8f3dd7a (patch)
treec19e32a061733e1470db7d1cc1d9e9e2e1ef1974 /llvm/lib/CodeGen
parent18948355e11104bd57c8d714a1348361552ee90d (diff)
downloadbcm5719-llvm-3bc3ddd638b3d90da4f0f59cad8c712ee8f3dd7a.tar.gz
bcm5719-llvm-3bc3ddd638b3d90da4f0f59cad8c712ee8f3dd7a.zip
Rename MemOperand to MachineMemOperand. This was suggested by
review feedback from Chris quite a while ago. No functionality change. llvm-svn: 49348
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp2
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp4
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp21
3 files changed, 14 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index d2aa2bb2212..6c4fb3c8340 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -693,7 +693,7 @@ void MachineInstr::print(std::ostream &OS, const TargetMachine *TM) const {
if (getNumMemOperands() > 0) {
OS << ", Mem:";
for (unsigned i = 0; i < getNumMemOperands(); i++) {
- const MemOperand &MRO = getMemOperand(i);
+ const MachineMemOperand &MRO = getMemOperand(i);
const Value *V = MRO.getValue();
assert((MRO.isLoad() || MRO.isStore()) &&
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 00b5677879f..2af394fa8a8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -369,7 +369,7 @@ unsigned ScheduleDAG::CountResults(SDNode *Node) {
unsigned ScheduleDAG::CountOperands(SDNode *Node) {
unsigned N = ComputeMemOperandsEnd(Node);
while (N && isa<MemOperandSDNode>(Node->getOperand(N - 1).Val))
- --N; // Ignore MemOperand nodes
+ --N; // Ignore MEMOPERAND nodes
return N;
}
@@ -656,7 +656,7 @@ void ScheduleDAG::AddOperand(MachineInstr *MI, SDOperand Op,
}
-void ScheduleDAG::AddMemOperand(MachineInstr *MI, const MemOperand &MO) {
+void ScheduleDAG::AddMemOperand(MachineInstr *MI, const MachineMemOperand &MO) {
MI->addMemOperand(MO);
}
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index a3a0c82e78a..a1d6c779b9b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -385,7 +385,7 @@ static void AddNodeIDNode(FoldingSetNodeID &ID, SDNode *N) {
ID.AddPointer(cast<SrcValueSDNode>(N)->getValue());
break;
case ISD::MEMOPERAND: {
- const MemOperand &MO = cast<MemOperandSDNode>(N)->MO;
+ const MachineMemOperand &MO = cast<MemOperandSDNode>(N)->MO;
ID.AddPointer(MO.getValue());
ID.AddInteger(MO.getFlags());
ID.AddInteger(MO.getOffset());
@@ -1014,7 +1014,7 @@ SDOperand SelectionDAG::getSrcValue(const Value *V) {
return SDOperand(N, 0);
}
-SDOperand SelectionDAG::getMemOperand(const MemOperand &MO) {
+SDOperand SelectionDAG::getMemOperand(const MachineMemOperand &MO) {
const Value *v = MO.getValue();
assert((!v || isa<PointerType>(v->getType())) &&
"SrcValue is not a pointer?");
@@ -3635,24 +3635,25 @@ GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA,
TheGlobal = const_cast<GlobalValue*>(GA);
}
-/// getMemOperand - Return a MemOperand object describing the memory
+/// getMemOperand - Return a MachineMemOperand object describing the memory
/// reference performed by this load or store.
-MemOperand LSBaseSDNode::getMemOperand() const {
+MachineMemOperand LSBaseSDNode::getMemOperand() const {
int Size = (MVT::getSizeInBits(getMemoryVT()) + 7) >> 3;
int Flags =
- getOpcode() == ISD::LOAD ? MemOperand::MOLoad : MemOperand::MOStore;
- if (IsVolatile) Flags |= MemOperand::MOVolatile;
+ getOpcode() == ISD::LOAD ? MachineMemOperand::MOLoad :
+ MachineMemOperand::MOStore;
+ if (IsVolatile) Flags |= MachineMemOperand::MOVolatile;
// Check if the load references a frame index, and does not have
// an SV attached.
const FrameIndexSDNode *FI =
dyn_cast<const FrameIndexSDNode>(getBasePtr().Val);
if (!getSrcValue() && FI)
- return MemOperand(PseudoSourceValue::getFixedStack(), Flags,
- FI->getIndex(), Size, Alignment);
+ return MachineMemOperand(PseudoSourceValue::getFixedStack(), Flags,
+ FI->getIndex(), Size, Alignment);
else
- return MemOperand(getSrcValue(), Flags,
- getSrcValueOffset(), Size, Alignment);
+ return MachineMemOperand(getSrcValue(), Flags,
+ getSrcValueOffset(), Size, Alignment);
}
/// Profile - Gather unique data for the node.
OpenPOWER on IntegriCloud