[PATCH] D66467: [Codegen] skip debug instr to avoid code change

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 01:29:35 PDT 2019


djtodoro added a comment.

@yechunliang  Thanks for the test case. Have you tried to simplify it?



================
Comment at: llvm/test/CodeGen/MIR/X86/branch-folder-with-debug.mir:156
+  
+  attributes #0 = { noreturn uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "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"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+  attributes #1 = { argmemonly nounwind willreturn }
----------------
I think we can delete the attributes.


================
Comment at: llvm/test/CodeGen/MIR/X86/branch-folder-with-debug.mir:237
+  !69 = !{null, !62}
+  !70 = !DILocation(line: 0, scope: !13)
+  !71 = !DILocation(line: 27, column: 3, scope: !13)
----------------
We can attach more instructions to the same `!DILocation` and by doing that we are simplifying the test case.


================
Comment at: llvm/test/CodeGen/MIR/X86/branch-folder-with-debug.mir:274
+alignment:       4
+exposesReturnsTwice: false
+legalized:       false
----------------
I think we don't need most of the MIR Function attributes, so we can delete some of them.


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

https://reviews.llvm.org/D66467





More information about the llvm-commits mailing list