[PATCH] D72807: [InstCombine] Fix worklist management in DSE (PR44552)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 13:29:09 PST 2020


nikic created this revision.
nikic added reviewers: spatel, lebedev.ri.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Fixes https://bugs.llvm.org/show_bug.cgi?id=44552. We need to make sure that the store is reprocessed, because performing DSE may expose more DSE opportunities.

There is a slight caveat here though: We need to make sure that we add back the store the worklist first, because that means it will be processed after the operands of the removed store have been processed. This is a general bug in InstCombine worklist management that I hope to address at some point, but for now it means we need to do this manually rather than just returning the instruction as changed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72807

Files:
  llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  llvm/test/Transforms/InstCombine/pr44552.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72807.238353.patch
Type: text/x-patch
Size: 189333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200115/cbd3b5ed/attachment-0001.bin>


More information about the llvm-commits mailing list