[PATCH] D16569: Emit line 0 line information for interesting 'orphan' instructions
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 09:49:22 PST 2016
probinson added a comment.
Some additional thoughts on reducing the size cost in the encoded line table.
First, using a null scope looks like it will force the file number to 1. See the inline comment.
Second, I'd hope that the column number is irrelevant and so we shouldn't bother explicitly setting it to zero. That's probably something that would have to be handled where the line-table gets encoded, rather than here, and so can be deferred to a follow-up.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1043
@@ -1036,3 +1042,3 @@
PrevInstLoc = DL;
recordSourceLine(0, 0, nullptr, 0);
}
----------------
Passing nullptr here looks like it will force the file number to 1. Often it is 1 anyway, but not necessarily, e.g. for an inline function definition in a header file. If it isn't already 1 then we'll waste space setting the file to 1 and back for no benefit. To save space in the encoded line table, we should pass Scope here.
This didn't really matter so much when UnknownLocations was the only way to get these directives, but now we're doing it "normally" so it matters more.
http://reviews.llvm.org/D16569
More information about the llvm-commits
mailing list