[PATCH] D58191: [DebugInfo] Make postra sinking of DBG_VALUEs safe in the presence of subregisters

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 17:18:13 PDT 2019


vsk added inline comments.


================
Comment at: lib/CodeGen/MachineSink.cpp:1208
+    DbgValsToSink.insert(DbgValsToSink.begin(), DbgValsToSinkSet.begin(),
+                         DbgValsToSinkSet.end());
 
----------------
jmorse wrote:
> aprantl wrote:
> > I think you may need to sort here to avoid nondeterministic output when iterating over a Set?
> Good catch, I've added a sort to avoid relying on the sets order.
Naive question, but: is llvm::sort sorting by address-of-the-MI here, or something else? (Just checking -- if it's the former that's not quite deterministic, and maybe a SetVector is called for)


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

https://reviews.llvm.org/D58191





More information about the llvm-commits mailing list