summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-02-24 02:35:30 +0000
committerBill Wendling <isanbard@gmail.com>2009-02-24 02:35:30 +0000
commit786c5973f7777dadca85a4be6a312df23b3d3bc6 (patch)
treed0b50012bb724093a38360b963a9e48b3a5c2772 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
parentcce27f55023428423dbb8ef2ffa64d8140d0bcca (diff)
downloadbcm5719-llvm-786c5973f7777dadca85a4be6a312df23b3d3bc6.tar.gz
bcm5719-llvm-786c5973f7777dadca85a4be6a312df23b3d3bc6.zip
- Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emit
a DBG_LABEL or not. We want to fall back to the original way of emitting debug info when we're in -O0/-fast mode. - Add plumbing in to pass the "Fast" flag to places that need it. - XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I need to investigate still. llvm-svn: 65367
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 4c737298345..bc417138bfd 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -3915,6 +3915,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
if (Fast)
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
getRoot(), LabelID));
+ DW->setFastCodeGen(Fast);
}
return 0;
@@ -3950,9 +3951,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
// create a label if this is a beginning of inlined function.
unsigned Line = Subprogram.getLineNumber();
- // FIXME: Support more than just -Os.
- const Function *F = I.getParent()->getParent();
- if (!F->hasFnAttr(Attribute::OptimizeForSize)) {
+ if (Fast) {
unsigned LabelID = DW->RecordSourceLine(Line, 0, SrcFile);
if (DW->getRecordSourceLineCount() != 1)
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
@@ -3966,8 +3965,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
return 0;
}
case Intrinsic::dbg_declare: {
- const Function *F = I.getParent()->getParent();
- if (!F->hasFnAttr(Attribute::OptimizeForSize)) {
+ if (Fast) {
DwarfWriter *DW = DAG.getDwarfWriter();
DbgDeclareInst &DI = cast<DbgDeclareInst>(I);
Value *Variable = DI.getVariable();
OpenPOWER on IntegriCloud