summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-26 17:15:30 +0000
committerChris Lattner <sabre@nondot.org>2005-08-26 17:15:30 +0000
commit5839bf2b3bd22689d9dd0e9de66c2dce71d130ae (patch)
tree4480de7555efc3cac705ebc1b01e4d702473a7fe /lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
parent95e0682a4276fb9f5978039dc4bae675bdf66ee3 (diff)
downloadllvm-5839bf2b3bd22689d9dd0e9de66c2dce71d130ae.tar.gz
llvm-5839bf2b3bd22689d9dd0e9de66c2dce71d130ae.tar.bz2
llvm-5839bf2b3bd22689d9dd0e9de66c2dce71d130ae.tar.xz
Change ConstantPoolSDNode to actually hold the Constant itself instead of
putting it into the constant pool. This allows the isel machinery to create constants that it will end up deciding are not needed, without them ending up in the resultant function constant pool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index bb0524db69..d69004a557 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -11,11 +11,12 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/Constants.h"
+#include "llvm/Function.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Target/MRegisterInfo.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/Function.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
@@ -67,7 +68,8 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
} else if (const FrameIndexSDNode *FIDN = dyn_cast<FrameIndexSDNode>(Node)) {
Op += " " + itostr(FIDN->getIndex());
} else if (const ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Node)){
- Op += "<" + utostr(CP->getIndex()) + ">";
+ if (ConstantFP *CFP = dyn_cast<ConstantFP>(CP->get()))
+ Op += "<" + ftostr(CFP->getValue()) + ">";
} else if (const BasicBlockSDNode *BBDN = dyn_cast<BasicBlockSDNode>(Node)) {
Op = "BB: ";
const Value *LBB = (const Value*)BBDN->getBasicBlock()->getBasicBlock();