[llvm-commits] [llvm] r65367 - in /llvm/trunk: include/llvm/CodeGen/DwarfWriter.h include/llvm/CodeGen/SelectionDAG.h lib/CodeGen/SelectionDAG/FastISel.cpp lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp test/DebugInfo/2009-01-30-Method.ll test/DebugInfo/deaddebuglabel.ll test/DebugInfo/forwardDecl.ll test/FrontendC++/2006-11-06-StackTrace.cpp test/FrontendC++/2006-11-30-Pubnames.cpp utils/TableGen/AsmWriterEmitter.cpp

Bill Wendling isanbard at gmail.com
Tue Feb 24 00:18:23 PST 2009


On Feb 23, 2009, at 11:49 PM, Evan Cheng wrote:

> Also what about tblgen changes?
>
> The code is still in X86GenAsmWriter.inc:
>
>   if (TAI->doesSupportDebugInformation() &&
>       DW->ShouldEmitDwarfDebug()) {
>     const MachineFunction *MF = MI->getParent()->getParent();
>     DebugLoc CurDL = MI->getDebugLoc();
>
>     if (!CurDL.isUnknown()) {
>       static DebugLocTuple PrevDLT(~0U, ~0U, ~0U);
>       DebugLocTuple CurDLT = MF->getDebugLocTuple(CurDL);
>
>       if (PrevDLT.Src != ~0U && PrevDLT != CurDLT)
> 	printLabel(DW->RecordSourceLine(CurDLT.Line, CurDLT.Col,
>                                         CurDLT.Src));
>
>       PrevDLT = CurDLT;
>     }
>   }
>
> This should not be run when "fast", right?
>
There should have been a check in there for "fast" already.

> While we are at it, it looks like this code should be simplified. If
> TAI->doesSupportDebugInformation()  is false, DW-
>> ShouldEmitDwarfDebug() should not return true. That means only the
> later check is needed?
>
Okay.

> Also, please make MF AsmPrinter class ivar so we can eliminate this:
> const MachineFunction *MF = MI->getParent()->getParent();
>

Okay.

-bw



More information about the llvm-commits mailing list