[PATCH] D100845: [Debugify][Original DI] Test preservation of original debug var intrinsics in optimizations

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 05:03:00 PDT 2021


djtodoro added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Debugify.cpp:465
+  bool Preserved = true;
+  for (const auto &V : DIFunctionsBefore) {
+    auto VarIt = DIFunctionsAfter.find(V.first);
----------------
jmorse wrote:
> djtodoro wrote:
> > jmorse wrote:
> > > Given that DIFunctionsBefore is a DenseMap, and the order of iteration here is being preserved by the `Bugs` array, won't this be vulnerable to DenseMaps non-deterministic iteration order? (Easily fixed by making everything `MapVector`s).
> > We have used the `DenseMap` for each DI Metadata checking, since we thought the order of reported bugs doesn't matter; do you think we should care about it?
> IMO yes: any kind of unexpected variation in the output is going to be fatal to anyone trying to script around this tooling. We should be conservative in what's outputted.
OK, sure. This https://reviews.llvm.org/D102841 addresses that.


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

https://reviews.llvm.org/D100845



More information about the llvm-commits mailing list