[PATCH] D70676: [DebugInfo] Don't repeatedly created undef DBG_VALUEs during machine-sinking

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 09:08:20 PST 2019


jmorse updated this revision to Diff 233384.
jmorse added a comment.

Here's a revised patch using SetVector, although it's not at the location I was expecting. As it turns out, the llvm::sort of DebugVariables I was using was actively harmful -- the operator< method of DebugVariable compares pointers, which is fine for DenseMaps, but not for ensuring a consistent order.

It took a quick look at implementing a correct operator< for DebugVariable, but it looks like metadata in general doesn't support ordering.

Without objection I'll drop this in in a couple of days, as the differences are minor. Thanks @hans for the report!


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

https://reviews.llvm.org/D70676

Files:
  llvm/lib/CodeGen/MachineSink.cpp
  llvm/test/DebugInfo/MIR/X86/machinesink.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70676.233384.patch
Type: text/x-patch
Size: 9435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191211/bac3f55b/attachment-0001.bin>


More information about the llvm-commits mailing list