[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h
Evan Cheng
evan.cheng at apple.com
Fri Oct 13 14:09:11 PDT 2006
Changes in directory llvm/include/llvm/CodeGen:
SelectionDAG.h updated: 1.135 -> 1.136
SelectionDAGNodes.h updated: 1.153 -> 1.154
---
Log message:
Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
---
Diffs of the changes: (+23 -14)
SelectionDAG.h | 5 ++++-
SelectionDAGNodes.h | 32 +++++++++++++++++++-------------
2 files changed, 23 insertions(+), 14 deletions(-)
Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.135 llvm/include/llvm/CodeGen/SelectionDAG.h:1.136
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.135 Thu Oct 12 15:33:14 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.h Fri Oct 13 16:08:54 2006
@@ -319,7 +319,10 @@
/// getStore - Helper function to build ISD::STORE nodes.
///
SDOperand getStore(SDOperand Chain, SDOperand Value, SDOperand Ptr,
- SDOperand SV);
+ const Value *SV, int SVOffset, bool isVolatile=false);
+ SDOperand getTruncStore(SDOperand Chain, SDOperand Value, SDOperand Ptr,
+ const Value *SV, int SVOffset, MVT::ValueType TVT,
+ bool isVolatile=false);
// getSrcValue - construct a node to track a Value* through the backend
SDOperand getSrcValue(const Value* I, int offset = 0);
Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.153 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.154
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.153 Wed Oct 11 02:08:53 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Fri Oct 13 16:08:54 2006
@@ -1408,15 +1408,6 @@
assert((Off.getOpcode() == ISD::UNDEF || AddrMode == ISD::POST_INDEXED) &&
"Only post-indexed load has a non-undef offset operand");
}
- LoadSDNode(SDOperand Chain, SDOperand Ptr, SDOperand Off,
- ISD::LoadExtType ETy, MVT::ValueType LVT,
- const Value *SV, int O=0, unsigned Align=1, bool Vol=false)
- : SDNode(ISD::LOAD, Chain, Ptr, Off),
- AddrMode(ISD::UNINDEXED), ExtType(ETy), LoadedVT(LVT), SrcValue(SV),
- SVOffset(O), Alignment(Align), IsVolatile(Vol) {
- assert((Off.getOpcode() == ISD::UNDEF || AddrMode == ISD::POST_INDEXED) &&
- "Only post-indexed load has a non-undef offset operand");
- }
public:
const SDOperand getChain() const { return getOperand(0); }
@@ -1461,10 +1452,10 @@
bool IsVolatile;
protected:
friend class SelectionDAG;
- StoreSDNode(SDOperand Chain, SDOperand Ptr, SDOperand Off,
+ StoreSDNode(SDOperand Chain, SDOperand Value, SDOperand Ptr, SDOperand Off,
ISD::MemOpAddrMode AM, bool isTrunc, MVT::ValueType SVT,
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
- : SDNode(ISD::STORE, Chain, Ptr, Off),
+ : SDNode(ISD::STORE, Chain, Value, Ptr, Off),
AddrMode(AM), IsTruncStore(isTrunc), StoredVT(SVT), SrcValue(SV),
SVOffset(O), Alignment(Align), IsVolatile(Vol) {
assert((Off.getOpcode() == ISD::UNDEF || AddrMode == ISD::POST_INDEXED) &&
@@ -1473,8 +1464,9 @@
public:
const SDOperand getChain() const { return getOperand(0); }
- const SDOperand getBasePtr() const { return getOperand(1); }
- const SDOperand getOffset() const { return getOperand(2); }
+ const SDOperand getValue() const { return getOperand(1); }
+ const SDOperand getBasePtr() const { return getOperand(2); }
+ const SDOperand getOffset() const { return getOperand(3); }
ISD::MemOpAddrMode getAddressingMode() const { return AddrMode; }
bool isTruncatingStore() const { return IsTruncStore; }
MVT::ValueType getStoredVT() const { return StoredVT; }
@@ -1591,6 +1583,20 @@
return N->getOpcode() == ISD::LOAD &&
cast<LoadSDNode>(N)->getExtensionType() == ISD::ZEXTLOAD;
}
+
+ /// isNON_TRUNCStore - Returns true if the specified node is a non-truncating
+ /// store.
+ inline bool isNON_TRUNCStore(const SDNode *N) {
+ return N->getOpcode() == ISD::STORE &&
+ !cast<StoreSDNode>(N)->isTruncatingStore();
+ }
+
+ /// isTRUNCStore - Returns true if the specified node is a truncating
+ /// store.
+ inline bool isTRUNCStore(const SDNode *N) {
+ return N->getOpcode() == ISD::STORE &&
+ cast<StoreSDNode>(N)->isTruncatingStore();
+ }
}
More information about the llvm-commits
mailing list