[PATCH] Add new debug kind LocTrackingOnly.

David Blaikie dblaikie at gmail.com
Fri Jun 20 13:28:15 PDT 2014


On Fri, Jun 20, 2014 at 1:24 PM, Diego Novillo <dnovillo at google.com> wrote:
> On Fri, Jun 20, 2014 at 4:17 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> As to the other comments about whether to add a value to the enum or use a
>> flag in createCompileUnit - for now I think I'm going to err on the side of
>> preferring a flag in createCompileUnit.
>
>
> Sure. I'll restore the original behaviour then.
>
>>
>> The Clang-side support for this should obviously look a fair bit like GMLT
>> (indeed if you put the enum value for this mode before GMLT, it should get
>> most/all the right behavior by default (though you might have to fix up some
>> comparisons for == GMLT to <= GMLT)). At some point we can probably simplify
>> this even further so all the scopes are just simple line/file info without
>> having to create any compile units, functions, lexical scopes, etc.
>
>
> Right. At the moment, the Clang-side support for this looks exactly like
> -gmlt. I've not needed to change anything since the code that checks for
> equality to DebugLineTablesOnly does not really affect loc tracking. I
> figured we can tweak those later (though I'll gladly change them to <=, it's
> only two spots that need fixing).

Those are probably worth changing and providing test coverage for. One
or both of them (I see one for creating function declarations and one
for creating function types) are what ensure -gmlt doesn't produce
metadata describing types and other things. If those checks fail, the
metadata for your loc tracking mode may be much larger (& we'll do
lots of work to create it, too) than necessary.

My guess would be without those fixes you'll see complex type metadata
in the IR that you don't really need.

>> Comment at: test/Transforms/LoopVectorize/X86/vectorization-remarks.ll:9
>> @@ +8,3 @@
>> +; DEBUG-OUTPUT-NOT: .loc
>> +; DEBUG-OUTPUT-NOT: {{.*}}.debug_info{{.*}}
>> +
>> ----------------
>> You don't need the {{.*}} on either side here, FileCheck looks for subline
>> matches by default (which is why the .loc as you've written it is correct).
>
>
> Done.
>
>
> Thanks. Diego.



More information about the llvm-commits mailing list