[PATCH] D49426: [DEBUG_INFO] fix .loc directives emitted for missing prologues
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 18 07:55:51 PDT 2018
dblaikie added a comment.
> There is future work planned (at my office) to address the interpretation of a sequence of .loc directives with no interleaved instructions.
Ah, great - I think that's the right fix to cover this isuse as well.
> I've hand rolled a .asm file with multiple sequential .loc directives and find similar results, regardless of prologue or otherwise.
Is that only the behavior of LLVM's integrated assembler - does gas (GCC assembler) skip these zero-length regions? (so we can more strongly justify this as a bug-fix/quality improvement (rather than a divergence from GCC's behavior))
> However, this particular piece of work addresses what I perceived to be an artefact, a .loc directive for a missing prologue.
I'm not sure it's really a bug here, though - if the assembler addressed the sub-optimality of producing zero-length regions. It seems to me like a natural implementation to change the location, emit the prologue, then change the location again - and if the prologue happens to be empty/zero-length, the correct output falls out naturally. Avoiding special casing the empty prologue keeps the code simple/easier to read/understand, I think.
https://reviews.llvm.org/D49426
More information about the llvm-commits
mailing list