//
// The LLVM Compiler Infrastructure
//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
#include "llvm/CodeGen/ScheduleDAG.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/Target/MRegisterInfo.h"
+#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/ADT/StringExtras.h"
//Op += " " + (const void*)BBDN->getBasicBlock();
} else if (const RegisterSDNode *R = dyn_cast<RegisterSDNode>(Node)) {
if (G && R->getReg() != 0 &&
- MRegisterInfo::isPhysicalRegister(R->getReg())) {
- Op = Op + " " + G->getTarget().getRegisterInfo()->getName(R->getReg());
+ TargetRegisterInfo::isPhysicalRegister(R->getReg())) {
+ Op = Op + " " +
+ G->getTarget().getRegisterInfo()->getName(R->getReg());
} else {
Op += " #" + utostr(R->getReg());
}
Op += "'" + std::string(ES->getSymbol()) + "'";
} else if (const SrcValueSDNode *M = dyn_cast<SrcValueSDNode>(Node)) {
if (M->getValue())
- Op += "<" + M->getValue()->getName() + ":" + itostr(M->getOffset()) + ">";
+ Op += "<" + M->getValue()->getName() + ">";
else
- Op += "<null:" + itostr(M->getOffset()) + ">";
+ Op += "<null>";
+ } else if (const MemOperandSDNode *M = dyn_cast<MemOperandSDNode>(Node)) {
+ if (M->MO.getValue())
+ Op += "<" + M->MO.getValue()->getName() + ":" + itostr(M->MO.getOffset()) + ">";
+ else
+ Op += "<null:" + itostr(M->MO.getOffset()) + ">";
} else if (const VTSDNode *N = dyn_cast<VTSDNode>(Node)) {
Op = Op + " VT=" + MVT::getValueTypeString(N->getVT());
} else if (const StringSDNode *N = dyn_cast<StringSDNode>(Node)) {
break;
}
if (doExt)
- Op = Op + MVT::getValueTypeString(LD->getLoadedVT()) + ">";
-
+ Op += MVT::getValueTypeString(LD->getMemoryVT()) + ">";
+ if (LD->isVolatile())
+ Op += "<V>";
Op += LD->getIndexedModeName(LD->getAddressingMode());
+ if (LD->getAlignment() > 1)
+ Op += " A=" + utostr(LD->getAlignment());
} else if (const StoreSDNode *ST = dyn_cast<StoreSDNode>(Node)) {
if (ST->isTruncatingStore())
- Op = Op + "<trunc " + MVT::getValueTypeString(ST->getStoredVT()) + ">";
+ Op += "<trunc " + MVT::getValueTypeString(ST->getMemoryVT()) + ">";
+ if (ST->isVolatile())
+ Op += "<V>";
Op += ST->getIndexedModeName(ST->getAddressingMode());
+ if (ST->getAlignment() > 1)
+ Op += " A=" + utostr(ST->getAlignment());
}
+
+#if 0
+ Op += " Id=" + itostr(Node->getNodeId());
+#endif
return Op;
}
GraphWriter<ScheduleDAG*> &GW) {
GW.emitSimpleNode(0, "plaintext=circle", "GraphRoot");
if (G->DAG.getRoot().Val)
- GW.emitEdge(0, -1, G->SUnitMap[G->DAG.getRoot().Val], -1, "");
+ GW.emitEdge(0, -1, G->SUnitMap[G->DAG.getRoot().Val].front(), -1, "");
}
};
}