[PATCH] D83468: [Debuginfo] Fix for PR46653

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 11:18:31 PDT 2020


arsenm added a comment.

In D83468#2224469 <https://reviews.llvm.org/D83468#2224469>, @Jac1494 wrote:

> This issue is with Global-isel and this line number is set in IRTranslator and Legalizer also.And I have suggested fix in IRTranslator and Legalizer pass previously but it was rejected.
>
> Is above understanding of the issue matches with your understanding ..?
>
> @aprantl , @arsenm Could you please suggest where this should be fixed ?? if this is not correct place to fix this issue , In other common passes of Global-isel and Selection-DAG or AsmPrinter...?

You're describing this in terms that are too high level. What is the codegen problem here? The IRTranslator and Legalizer do not set the line number, they're supposed to just forward the line number it already has. How/why is this a codegen problem? Why is the debug location they're starting with not correct?



================
Comment at: llvm/test/DebugInfo/debugline-no-prologue_end.ll:2
+; RUN: llc -march=arm64 -filetype=obj -O0 %s -o - | llvm-dwarfdump -debug-line - | FileCheck %s
+; CHECK-NOT: 0x{{.*}} 0 0 1 0 is_stmt prologue_end
+
----------------
This check is far too fragile. This should use positive checks


================
Comment at: llvm/test/DebugInfo/debugline-no-prologue_end.ll:22-27
+attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="non-leaf" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="non-leaf" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon" "unsafe-fp-math"="false" "use-soft-float"="false" }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!3, !4, !5}
+!llvm.ident = !{!6}
----------------
Don't need most of these attributes or metadata


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83468/new/

https://reviews.llvm.org/D83468



More information about the llvm-commits mailing list