[PATCH] D53365: [Codegen] - Implement basic .debug_loclists section emission (DWARF5).

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 13:41:18 PDT 2018


grimar added inline comments.


================
Comment at: test/CodeGen/X86/debug-loclists.ll:7
+; CHECK-NEXT: 0x00000000:
+; CHECK-NEXT:             [0x0000000000000000, 0x000000000000001e): DW_OP_breg3 RBX+0
+
----------------
dblaikie wrote:
> grimar wrote:
> > dblaikie wrote:
> > > Probably use a -v dump to test the specific LLE opcodes, etc?
> > But I am already using `llvm-dwarfdump -v`. It shows `DW_OP_breg3 RBX+0` already.
> > 
> > I added a piece from the `.debug_info` to the test to show how location is used here.
> > 
> > If you mean to test all possible LLE opcodes, that is probably should be in the patch for llvm-dwarfdump :)
> I think in this case it's interesting/worth testing the particular choice of LLE encoding that LLVM used to emit this list. (see similar tests for RLE, I think?)
> 
> Other tests that are interested in testing the high level "this range has this location, this range has this location" would use the sort of checking you have here.
Ah, I see what you mean now. Did not realize you're talking about LLE* entry kinds (that is how they are called in the standard it seems) and not about dumping the DW_OP* opcodes. That makes sense.

At a very quick look, I see tests dumping DW_RLE_* with -v option, but seems nothing dumps DW_LLE_*.
So seems it needs adding this functionality to the llvm-dwarfdump perhaps.
I'll take a look closer tomorrow and do that then. Thanks!


================
Comment at: test/CodeGen/X86/debug-loclists.ll:69-72
+attributes #0 = { noinline optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind readnone speculatable }
+attributes #2 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #3 = { noinline norecurse nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
----------------
dblaikie wrote:
> Generally folks strip out the attribute lists since they aren't important to most debug info test cases and add some noise to trying to understand what's being tested.
Will do.


https://reviews.llvm.org/D53365





More information about the llvm-commits mailing list