[PATCH] D116305: [CSInfo][clang][ISEL][RISCV] Support for recovering optimized debug function parameters

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 27 05:24:14 PST 2021


djtodoro added a comment.

Thanks for this. Some initial comments inline.

Please apply the suggestions to all tests.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:9141
+
+      const TargetOptions &Options = DAG.getTarget().Options;
+      if (Options.SupportsDebugEntryValues)
----------------
This is an invariant, could we hoist it outside the loop?


================
Comment at: llvm/test/CodeGen/RISCV/call-site-info-output_riscv32.ll:39-42
+; ModuleID = '../llvm-project/llvm/test/CodeGen/RISCV/dwarf.c'
+source_filename = "../llvm-project/llvm/test/CodeGen/RISCV/dwarf.c"
+target datalayout = "e-m:e-p:32:32-i64:64-n32-S128"
+target triple = "riscv32-unknown-linux-elf-unknown"
----------------
not needed


================
Comment at: llvm/test/CodeGen/RISCV/call-site-info-output_riscv32.ll:55
+; Function Attrs: argmemonly mustprogress nofree nosync nounwind willreturn
+declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #1
+
----------------
I think the lifetime intrinsics are not needed for this.


================
Comment at: llvm/test/CodeGen/RISCV/call-site-info-output_riscv32.ll:86-90
+attributes #0 = { noinline nounwind "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+a,+c,+d,+f,+m,+relax,-save-restore" }
+attributes #1 = { argmemonly mustprogress nofree nosync nounwind willreturn }
+attributes #2 = { "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+a,+c,+d,+f,+m,+relax,-save-restore" }
+attributes #3 = { nofree nosync nounwind readnone speculatable willreturn }
+attributes #4 = { nounwind }
----------------
we don't need most of these


================
Comment at: llvm/test/CodeGen/RISCV/call-site-info-output_riscv32.ll:96
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 13.0.0 (https://github.com/mmatic05/llvm-project.git 77c12b90754642b38e244a18477e3711a45cdf99)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "../llvm-project/llvm/test/CodeGen/RISCV/dwarf.c", directory: "/home/syrmia/FORK/buildReleaseMode")
----------------



================
Comment at: llvm/test/CodeGen/RISCV/call-site-info-output_riscv32.ll:97
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 13.0.0 (https://github.com/mmatic05/llvm-project.git 77c12b90754642b38e244a18477e3711a45cdf99)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "../llvm-project/llvm/test/CodeGen/RISCV/dwarf.c", directory: "/home/syrmia/FORK/buildReleaseMode")
+!2 = !{}
----------------



================
Comment at: llvm/test/CodeGen/RISCV/call-site-info-output_riscv32.ll:104
+!7 = !{i32 1, !"SmallDataLimit", i32 8}
+!8 = !{!"clang version 13.0.0 (https://github.com/mmatic05/llvm-project.git 77c12b90754642b38e244a18477e3711a45cdf99)"}
+!9 = distinct !DISubprogram(name: "fn2", scope: !1, file: !1, line: 3, type: !10, scopeLine: 3, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !13)
----------------



================
Comment at: llvm/test/CodeGen/RISCV/call-site-info-output_riscv32.ll:137-141
+!41 = !DILocation(line: 0, scope: !24)
+!42 = !DILocation(line: 10, column: 3, scope: !24)
+!43 = !DILocation(line: 11, column: 7, scope: !24)
+!44 = !DILocation(line: 12, column: 7, scope: !24)
+!45 = !DILocation(line: 13, column: 7, scope: !24)
----------------
all of these could use just one DILocation


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

https://reviews.llvm.org/D116305



More information about the llvm-commits mailing list