[PATCH] D15857: [InstCombine] Defend against worst-case exponential execution time

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 02:07:27 PST 2016


jmolloy updated this revision to Diff 44450.
jmolloy added a comment.

Hi Joerg,

Thanks for that bug report. It saved me some embarassment when the asan bot would have picked it up post-commit.

The issue was holding a reference into a DenseMap which can be invalidated during a hashtable resize. This is solved (as in other places in LLVM) by explicitly using a std::map.

James


Repository:
  rL LLVM

http://reviews.llvm.org/D15857

Files:
  include/llvm/Transforms/Utils/Local.h
  lib/CodeGen/CodeGenPrepare.cpp
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  lib/Transforms/Utils/Local.cpp
  test/Transforms/CodeGenPrepare/bitreverse-hang.ll
  test/Transforms/CodeGenPrepare/bitreverse-recognize.ll
  test/Transforms/InstCombine/bitreverse-hang.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15857.44450.patch
Type: text/x-patch
Size: 26556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160111/2db21d6c/attachment-0001.bin>


More information about the llvm-commits mailing list