[PATCH] D36596: [InstCombine] Don't convert all dbg.declares to dbg.values

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 16:03:41 PDT 2017


aprantl added a comment.

What happens when there are only loads from the alloca, shouldn't they be handled similarly?

  int i;
  f(&i)
  return i+1;



================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2061
-          case Intrinsic::dbg_declare:
-          case Intrinsic::dbg_value:
           case Intrinsic::invariant_start:
----------------
What's the effect of this change?


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2097
+
+  // If we are removing a local variable, insert dbg.value calls before each
+  // store.
----------------
Maybe  "If we are removing an alloca ..."?


https://reviews.llvm.org/D36596





More information about the llvm-commits mailing list