[llvm-branch-commits] [llvm-branch] r99837 - in /llvm/branches/Apple/Morbo: include/llvm/CodeGen/SelectionDAG.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Transforms/IPO/FunctionAttrs.cpp
Evan Cheng
evan.cheng at apple.com
Mon Mar 29 13:58:30 PDT 2010
Author: evancheng
Date: Mon Mar 29 15:58:30 2010
New Revision: 99837
URL: http://llvm.org/viewvc/llvm-project?rev=99837&view=rev
Log:
Merge 99836.
Modified:
llvm/branches/Apple/Morbo/include/llvm/CodeGen/SelectionDAG.h
llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/branches/Apple/Morbo/lib/Transforms/IPO/FunctionAttrs.cpp (props changed)
Modified: llvm/branches/Apple/Morbo/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/include/llvm/CodeGen/SelectionDAG.h?rev=99837&r1=99836&r2=99837&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/branches/Apple/Morbo/include/llvm/CodeGen/SelectionDAG.h Mon Mar 29 15:58:30 2010
@@ -34,6 +34,7 @@
class MachineConstantPoolValue;
class MachineFunction;
class MachineModuleInfo;
+class MDNode;
class SDNodeOrdering;
class SDDbgValue;
class TargetLowering;
@@ -767,6 +768,15 @@
SDNode *getNodeIfExists(unsigned Opcode, SDVTList VTs,
const SDValue *Ops, unsigned NumOps);
+ /// getDbgValue - Creates a SDDbgValue node.
+ ///
+ SDDbgValue *getDbgValue(MDNode *MDPtr, SDNode *N, unsigned R, uint64_t Off,
+ DebugLoc DL, unsigned O);
+ SDDbgValue *getDbgValue(MDNode *MDPtr, Value *C, uint64_t Off,
+ DebugLoc DL, unsigned O);
+ SDDbgValue *getDbgValue(MDNode *MDPtr, unsigned FI, uint64_t Off,
+ DebugLoc DL, unsigned O);
+
/// DAGUpdateListener - Clients of various APIs that cause global effects on
/// the DAG can optionally implement this interface. This allows the clients
/// to handle the various sorts of updates that happen.
Modified: llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=99837&r1=99836&r2=99837&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Mar 29 15:58:30 2010
@@ -842,6 +842,7 @@
Root = getEntryNode();
delete Ordering;
Ordering = new SDNodeOrdering();
+ DbgInfo->clear();
delete DbgInfo;
DbgInfo = new SDDbgInfo();
}
@@ -4877,6 +4878,29 @@
return NULL;
}
+/// getDbgValue - Creates a SDDbgValue node.
+///
+SDDbgValue *
+SelectionDAG::getDbgValue(MDNode *MDPtr, SDNode *N, unsigned R, uint64_t Off,
+ DebugLoc DL, unsigned O) {
+ SDDbgValue *DV = Allocator.Allocate<SDDbgValue>();
+ return new (DV) SDDbgValue(MDPtr, N, R, Off, DL, O);
+}
+
+SDDbgValue *
+SelectionDAG::getDbgValue(MDNode *MDPtr, Value *C, uint64_t Off,
+ DebugLoc DL, unsigned O) {
+ SDDbgValue *DV = Allocator.Allocate<SDDbgValue>();
+ return new (DV) SDDbgValue(MDPtr, C, Off, DL, O);
+}
+
+SDDbgValue *
+SelectionDAG::getDbgValue(MDNode *MDPtr, unsigned FI, uint64_t Off,
+ DebugLoc DL, unsigned O) {
+ SDDbgValue *DV = Allocator.Allocate<SDDbgValue>();
+ return new (DV) SDDbgValue(MDPtr, FI, Off, DL, O);
+}
+
namespace {
/// RAUWUpdateListener - Helper for ReplaceAllUsesWith - When the node
Modified: llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=99837&r1=99836&r2=99837&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Mar 29 15:58:30 2010
@@ -3819,22 +3819,19 @@
// debug info exists.
++SDNodeOrder;
if (isa<ConstantInt>(V) || isa<ConstantFP>(V)) {
- SDDbgValue* dv = new SDDbgValue(Variable, V, Offset, dl, SDNodeOrder);
- DAG.AddDbgValue(dv);
+ DAG.AddDbgValue(DAG.getDbgValue(Variable, V, Offset, dl, SDNodeOrder));
} else {
SDValue &N = NodeMap[V];
- if (N.getNode()) {
- SDDbgValue *dv = new SDDbgValue(Variable, N.getNode(),
- N.getResNo(), Offset, dl, SDNodeOrder);
- DAG.AddDbgValue(dv, N.getNode());
- } else {
+ if (N.getNode())
+ DAG.AddDbgValue(DAG.getDbgValue(Variable, N.getNode(),
+ N.getResNo(), Offset, dl, SDNodeOrder),
+ N.getNode());
+ else
// We may expand this to cover more cases. One case where we have no
// data available is an unreferenced parameter; we need this fallback.
- SDDbgValue* dv = new SDDbgValue(Variable,
+ DAG.AddDbgValue(DAG.getDbgValue(Variable,
UndefValue::get(V->getType()),
- Offset, dl, SDNodeOrder);
- DAG.AddDbgValue(dv);
- }
+ Offset, dl, SDNodeOrder));
}
// Build a debug info table entry.
Propchange: llvm/branches/Apple/Morbo/lib/Transforms/IPO/FunctionAttrs.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Mar 29 15:58:30 2010
@@ -1 +1 @@
-/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp:99492,99539
+/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp:99492,99539,99836
More information about the llvm-branch-commits
mailing list