summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-12-18 19:06:30 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-12-18 19:06:30 +0000
commit78ced47a2f91a566657a745bf761380ac286a99f (patch)
treeb39cf62d9fe7bdbff5bccb4d90db9ec86860a46e /llvm/lib/CodeGen
parentd92e71cf9a9ae831f0e7583ddc8f03e6f6374300 (diff)
downloadbcm5719-llvm-78ced47a2f91a566657a745bf761380ac286a99f.tar.gz
bcm5719-llvm-78ced47a2f91a566657a745bf761380ac286a99f.zip
Also print alignment and volatileness.
llvm-svn: 45164
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 85dd37f2c8a..3322cddaf0a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -3939,6 +3939,15 @@ void SDNode::dump(const SelectionDAG *G) const {
} else if (const VTSDNode *N = dyn_cast<VTSDNode>(this)) {
cerr << ":" << MVT::getValueTypeString(N->getVT());
} else if (const LoadSDNode *LD = dyn_cast<LoadSDNode>(this)) {
+ const Value *SrcValue = LD->getSrcValue();
+ int SrcOffset = LD->getSrcValueOffset();
+ cerr << " <";
+ if (SrcValue)
+ cerr << SrcValue;
+ else
+ cerr << "null";
+ cerr << ":" << SrcOffset << ">";
+
bool doExt = true;
switch (LD->getExtensionType()) {
default: doExt = false; break;
@@ -3958,16 +3967,19 @@ void SDNode::dump(const SelectionDAG *G) const {
const char *AM = getIndexedModeName(LD->getAddressingMode());
if (*AM)
cerr << " " << AM;
-
- const Value *SrcValue = LD->getSrcValue();
- int SrcOffset = LD->getSrcValueOffset();
+ if (LD->isVolatile())
+ cerr << " <volatile>";
+ cerr << " alignment=" << LD->getAlignment();
+ } else if (const StoreSDNode *ST = dyn_cast<StoreSDNode>(this)) {
+ const Value *SrcValue = ST->getSrcValue();
+ int SrcOffset = ST->getSrcValueOffset();
cerr << " <";
if (SrcValue)
cerr << SrcValue;
else
cerr << "null";
cerr << ":" << SrcOffset << ">";
- } else if (const StoreSDNode *ST = dyn_cast<StoreSDNode>(this)) {
+
if (ST->isTruncatingStore())
cerr << " <trunc "
<< MVT::getValueTypeString(ST->getStoredVT()) << ">";
@@ -3975,15 +3987,9 @@ void SDNode::dump(const SelectionDAG *G) const {
const char *AM = getIndexedModeName(ST->getAddressingMode());
if (*AM)
cerr << " " << AM;
-
- const Value *SrcValue = ST->getSrcValue();
- int SrcOffset = ST->getSrcValueOffset();
- cerr << " <";
- if (SrcValue)
- cerr << SrcValue;
- else
- cerr << "null";
- cerr << ":" << SrcOffset << ">";
+ if (ST->isVolatile())
+ cerr << " <volatile>";
+ cerr << " alignment=" << ST->getAlignment();
}
}
OpenPOWER on IntegriCloud