Context = DAG.getContext();
LPadToCallSiteMap.clear();
SL->init(DAG.getTargetLoweringInfo(), TM, DAG.getDataLayout());
+ AssignmentTrackingEnabled = isAssignmentTrackingEnabled(
+ *DAG.getMachineFunction().getFunction().getParent());
}
void SelectionDAGBuilder::clear() {
}
case Intrinsic::dbg_declare: {
// Debug intrinsics are handled separately in assignment tracking mode.
- if (isAssignmentTrackingEnabled(*I.getFunction()->getParent()))
+ if (AssignmentTrackingEnabled)
return;
// Assume dbg.declare can not currently use DIArgList, i.e.
// it is non-variadic.
}
case Intrinsic::dbg_assign: {
// Debug intrinsics are handled seperately in assignment tracking mode.
- assert(isAssignmentTrackingEnabled(*I.getFunction()->getParent()) &&
+ assert(AssignmentTrackingEnabled &&
"expected assignment tracking to be enabled");
return;
}
case Intrinsic::dbg_value: {
// Debug intrinsics are handled seperately in assignment tracking mode.
- if (isAssignmentTrackingEnabled(*I.getFunction()->getParent()))
+ if (AssignmentTrackingEnabled)
return;
const DbgValueInst &DI = cast<DbgValueInst>(I);
assert(DI.getVariable() && "Missing variable");
/// We defer handling these until we do see it.
MapVector<const Value*, DanglingDebugInfoVector> DanglingDebugInfoMap;
+ /// Cache the module flag for whether we should use debug-info assignment
+ /// tracking.
+ bool AssignmentTrackingEnabled = false;
+
public:
/// Loads are not emitted to the program immediately. We bunch them up and
/// then emit token factor nodes when possible. This allows us to get simple