Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.239 -> 1.240
ScheduleDAG.cpp updated: 1.53 -> 1.54
---
Log message:

Disengage DEBUG_LOC from non-PPC targets.


---
Diffs of the changes:  (+17 -13)

 LegalizeDAG.cpp |   28 ++++++++++++++++------------
 ScheduleDAG.cpp |    2 +-
 2 files changed, 17 insertions(+), 13 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.239 
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.240
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.239 Wed Dec 21 14:21:51 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp       Wed Dec 21 14:51:36 2005
@@ -622,18 +622,22 @@
     case TargetLowering::Promote:
     default: assert(0 && "This action is not supported yet!");
     case TargetLowering::Expand: {
-      MachineDebugInfo &DebugInfo = DAG.getMachineFunction().getDebugInfo();
-      std::vector<SDOperand> Ops;
-      Ops.push_back(Tmp1);  // chain
-      Ops.push_back(Node->getOperand(1));  // line #
-      Ops.push_back(Node->getOperand(2));  // col #
-      const std::string &fname =
-        cast<StringSDNode>(Node->getOperand(3))->getValue();
-      const std::string &dirname = 
-        cast<StringSDNode>(Node->getOperand(4))->getValue();
-      unsigned id = DebugInfo.RecordSource(fname, dirname);
-      Ops.push_back(DAG.getConstant(id, MVT::i32));  // source file id
-      Result = DAG.getNode(ISD::DEBUG_LOC, MVT::Other, Ops);
+      if (TLI.isOperationLegal(ISD::DEBUG_LOC, MVT::Other)) {
+        MachineDebugInfo &DebugInfo = DAG.getMachineFunction().getDebugInfo();
+        std::vector<SDOperand> Ops;
+        Ops.push_back(Tmp1);  // chain
+        Ops.push_back(Node->getOperand(1));  // line #
+        Ops.push_back(Node->getOperand(2));  // col #
+        const std::string &fname =
+          cast<StringSDNode>(Node->getOperand(3))->getValue();
+        const std::string &dirname = 
+          cast<StringSDNode>(Node->getOperand(4))->getValue();
+        unsigned id = DebugInfo.RecordSource(fname, dirname);
+        Ops.push_back(DAG.getConstant(id, MVT::i32));  // source file id
+        Result = DAG.getNode(ISD::DEBUG_LOC, MVT::Other, Ops);
+      } else {
+        Result = Tmp1;  // chain
+      }
       Result = LegalizeOp(Result);  // Relegalize new nodes.
       break;
     }


Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.53 
llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.54
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.53  Mon Dec 19 10:32:26 2005
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp       Wed Dec 21 14:51:36 2005
@@ -691,7 +691,7 @@
   } else {
     Ordering.push_back(NI);
   }
-  
+
   // Iterate through all nodes that have been added
   for (unsigned i = 0; i < Ordering.size(); i++) { // note: size() varies
     // Visit all operands



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to