Generate these labels when we're in "fast" mode, not simply when we're no in
"optimize-for-size" mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65064 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 6b78eb9..205b7b9 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -3915,10 +3915,7 @@
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));
}
@@ -3931,10 +3928,7 @@
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));
}