search for: begininstruct

Displaying 6 results from an estimated 6 matches for "begininstruct".

2018 Jun 20
2
[RFC] Removing debug locations from ConstantSDNodes
...hink if you remove locations from ConstantSDNodes, you might want to add a late pass that propagates source locations backwards onto location-less instructions. This would also avoid some special cases when a basic block starts with an instruction that lacks location information. See CodeViewDebug::beginInstruction and DwarfDebug::beginInstruction for what we do today. Interesting, I hadn't considered doing this. What happens in the special case where a block starts with a location-less instruction? Ah, I see that CodeViewDebug::beginInstruction does a forward scan to find the first instruction with...
2018 Jun 20
5
[RFC] Removing debug locations from ConstantSDNodes
...gger formats, so it may very well be reasonable to backfill the information in a late pass to avoid having assembler instructions without debug info as some people proposed. - Matthias > On Jun 20, 2018, at 11:09 AM, via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > DwarfDebug::beginInstruction sets the location to line 0 because otherwise the location is implicitly the same location as the last instruction of the physically preceding block. That location is often completely unrelated to what's at the top of the new block. Line 0 isn't great, but at least it's not a compl...
2018 Jun 20
4
[RFC] Removing debug locations from ConstantSDNodes
Some time ago I saw a report of strange single-stepping behavior given Swift code that looks like this: 1| var input = [16, 14, 10, 9, 8, 7, 4, 3, 2, 1] //< Only number 1 is relevant. 2| print("start") TL;DR: The debugger steps from line 2 -> 1 -> 2 in this code example. One clean way to fix this bug is to remove debug locations from ConstantSDNodes, and I'm asking if
2016 Aug 17
2
CodeView and "line 0" ?
I mean, we just skip over instructions without a DebugLoc: void CodeViewDebug::beginInstruction(const MachineInstr *MI) { DebugHandlerBase::beginInstruction(MI); // Ignore DBG_VALUE locations and function prologue. if (!Asm || !CurFn || MI->isDebugValue() || MI->getFlag(MachineInstr::FrameSetup)) return; DebugLoc DL = MI->getDebugLoc(); if (DL == PrevInstLoc |...
2016 Aug 17
2
CodeView and "line 0" ?
I've been playing with Fred Riss's "line 0" patch for DWARF (https://reviews.llvm.org/D16569) but in adapting it for current trunk, I find the DwarfDebug stuff has been refactored to allow either DWARF or CodeView. That's all good, but the question is whether the "line 0" patch should be DWARF-specific or common. The DWARF spec explicitly states that code not
2013 Apr 26
0
[LLVMdev] Inconsistent use of is_stmt flag in .debug_line
...always applied to line entries for functions. This may only affect the arm backend. Compiling the same code with the aarch64 backend does not demonstrate this problem. It seems that DwarfDebug::beginFunction always generates a line table entry with is_stmt for each function. Later, in DwarfDebug::beginInstruction, we create more line table entries. If we have an instruction in a function which: 1) Is associated with the line number of the beginning of the function 2) Comes before the end of the prologue then we overwrite the earlier line table entry with a similar entry which lacks the is_stmt flag. Th...