if (DW && DW->ValidDebugInfo(RSI.getContext())) {
unsigned LabelID =
DW->RecordRegionStart(cast<GlobalVariable>(RSI.getContext()));
- const Function *F = I.getParent()->getParent();
-
- // FIXME: Support more than just -Os.
- if (!F->hasFnAttr(Attribute::OptimizeForSize))
+ if (Fast)
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
getRoot(), LabelID));
}
if (DW && DW->ValidDebugInfo(REI.getContext())) {
unsigned LabelID =
DW->RecordRegionEnd(cast<GlobalVariable>(REI.getContext()));
- const Function *F = I.getParent()->getParent();
-
- // FIXME: Support more than just -Os.
- if (!F->hasFnAttr(Attribute::OptimizeForSize))
+ if (Fast)
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
getRoot(), LabelID));
}
/// FuncInfo - Information about the function as a whole.
///
FunctionLoweringInfo &FuncInfo;
+
+ /// Fast - We are in -fast mode.
+ ///
+ bool Fast;
/// GFI - Garbage collection metadata for the function.
GCFunctionInfo *GFI;
SelectionDAGLowering(SelectionDAG &dag, TargetLowering &tli,
- FunctionLoweringInfo &funcinfo)
+ FunctionLoweringInfo &funcinfo, bool fast)
: CurDebugLoc(DebugLoc::getUnknownLoc()),
- TLI(tli), DAG(dag), FuncInfo(funcinfo) {
+ TLI(tli), DAG(dag), FuncInfo(funcinfo), Fast(fast) {
}
void init(GCFunctionInfo *gfi, AliasAnalysis &aa);
FunctionPass(&ID), TM(tm), TLI(*tm.getTargetLowering()),
FuncInfo(new FunctionLoweringInfo(TLI)),
CurDAG(new SelectionDAG(TLI, *FuncInfo)),
- SDL(new SelectionDAGLowering(*CurDAG, TLI, *FuncInfo)),
+ SDL(new SelectionDAGLowering(*CurDAG, TLI, *FuncInfo, fast)),
GFI(),
Fast(fast),
DAGSize(0)