[PATCH] D57629: [LoopIdiomRecognize] @llvm.dbg values shouldn't affect the transformation.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 1 17:06:18 PST 2019


aprantl added a comment.

LGTM with a little simpler testcase



================
Comment at: llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1467
+  uint32_t HeaderSize =
+      std::distance(InstWithoutDebugIt.begin(), InstWithoutDebugIt.end());
+
----------------
I would be surprised if this is the only occurrence of this exact bug...


================
Comment at: llvm/test/Transforms/LoopIdiom/dbginfo-cost.ll:46
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 9.0.0 (ijonpan at m35lp38.lnxne.boe:llvm/llvm-dev-2/tools/clang a87ff88c6466fbedd6281513b9480a2cad6c08c8) (llvm/llvm-dev-2 922a3b1b3254bf3310c467e880a5419c1e13c87f)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !23, globals: !35, nameTableKind: None)
+!1 = !DIFile(filename: "configfile.c", directory: "/home/ijonpan/minispec-2006/spec-llvm/464.h264ref/build")
----------------
It looks like we could safely strip out most of the debug info by removing enums: and friends, and making all !dbg attachments point to the same source location.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57629





More information about the llvm-commits mailing list