[llvm] r196178 - Make ranges and range lists be a discrete entity that can be located

Eric Christopher echristo at gmail.com
Wed Dec 4 12:59:45 PST 2013


>> +      // Emit a symbol so we can find the beginning of the range.
>> +      Asm->OutStreamer.EmitLabel(
>> +          Asm->GetTempSymbol("debug_ranges", List->getIndex()));
>
> If I understood our conversation on IRC yesterday - there was some
> desire to avoid creating and using labels indirectly via use of the
> same name in disparate places? (see my recent commits for changes in
> this direction)
>
> To that end, should the MCSymbol* for the label be a member of the
> RangeSpanList so it can be reused rather than recreated? I think this
> would make it clearer than just having the index in the list.
>

Oh likely :)

>> +  // List of range lists for a given compile unit, separate from the ranges for
>> +  // the CU itself.
>
> Rereading this code I started thinking about the higher level and was
> confused by just why there was a list of lists of ranges in the CU,
> ratehr than just a single list. Obviously it's because this list
> contains ranges for the elements within this CU, perhaps it'd be
> useful to expand the comment a bit to describe that - "List of range
> sets for the elements (functions, globals, and lexical blocks) of this
> compilation unit, separate from the range set of the CU itself" ?
>

Hrm. I don't think this is any more clear. I'll think about it a bit
and figure out a better comment though.

-eric



More information about the llvm-commits mailing list