[llvm-commits] [llvm] r47359 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
sabre at nondot.org
Tue Feb 19 22:28:01 PST 2008
Author: lattner
Date: Wed Feb 20 00:28:01 2008
New Revision: 47359
URL: http://llvm.org/viewvc/llvm-project?rev=47359&view=rev
Log:
Fix an incredibly subtle bug exposed by Ted's change to APInt profiling.
AddNodeIDNode does profiling for a ConstantSDNode, but so does
SelectionDAG::getConstant. This profiling should be moved to a common
static function in ConstantSDNode.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=47359&r1=47358&r2=47359&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 20 00:28:01 2008
@@ -361,7 +361,7 @@
default: break; // Normal nodes don't need extra info.
case ISD::TargetConstant:
case ISD::Constant:
- ID.AddInteger(cast<ConstantSDNode>(N)->getValue());
+ ID.Add(cast<ConstantSDNode>(N)->getAPIntValue());
break;
case ISD::TargetConstantFP:
case ISD::ConstantFP: {
More information about the llvm-commits
mailing list