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

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 10:32:55 PDT 2018


dblaikie added inline comments.


================
Comment at: test/CodeGen/X86/debug-loclists.ll:7
+; CHECK-NEXT: 0x00000000:
+; CHECK-NEXT:             [0x0000000000000000, 0x000000000000001e): DW_OP_breg3 RBX+0
+
----------------
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.


================
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" }
----------------
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.


https://reviews.llvm.org/D53365





More information about the llvm-commits mailing list