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;
}
} 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
// We don't have line number support yet.
setOperationAction(ISD::LOCATION, MVT::Other, Expand);
+ setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
addLegalFPImmediate(+0.0); //F31
addLegalFPImmediate(-0.0); //-F31
// We don't have line number support yet.
setOperationAction(ISD::LOCATION, MVT::Other, Expand);
+ setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
//IA64 has these, but they are not implemented
setOperationAction(ISD::CTTZ , MVT::i64 , Expand);
// We don't have line number support yet.
setOperationAction(ISD::LOCATION, MVT::Other, Expand);
+ setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
computeRegisterProperties();
setOperationAction(ISD::SHL_PARTS, MVT::i32, Expand);
setOperationAction(ISD::SRA_PARTS, MVT::i32, Expand);
setOperationAction(ISD::SRL_PARTS, MVT::i32, Expand);
+
+ // We don't have line number support yet.
+ setOperationAction(ISD::LOCATION, MVT::Other, Expand);
+ setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
+
computeRegisterProperties();
}
setOperationAction(ISD::SHL_PARTS, MVT::i32, Expand);
setOperationAction(ISD::SRA_PARTS, MVT::i32, Expand);
setOperationAction(ISD::SRL_PARTS, MVT::i32, Expand);
+
+ // We don't have line number support yet.
+ setOperationAction(ISD::LOCATION, MVT::Other, Expand);
+ setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
+
computeRegisterProperties();
}
// We don't have line number support yet.
setOperationAction(ISD::LOCATION, MVT::Other, Expand);
+ setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
if (X86ScalarSSE) {
// Set up the FP register classes.