[PM] Fix a bad invalid densemap iterator bug in the new invalidation
authorChandler Carruth <chandlerc@gmail.com>
Tue, 29 Nov 2016 12:54:34 +0000 (12:54 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 29 Nov 2016 12:54:34 +0000 (12:54 +0000)
commit9ac7a059b6311bcea644f95913d2337e92f21898
tree517e977b4f7c161b584c55bd8dc0472e9eb88cba
parentdf8f35b7b80ba1f09561b66f72f20f6be038aafa
[PM] Fix a bad invalid densemap iterator bug in the new invalidation
logic.

Yup, the invalidation logic has an invalid iterator bug. Can't make this
stuff up.

We can recursively insert things into the map so we can't cache the
iterator into that map across those recursive calls. We did this
differently in two places. I have an end-to-end test that triggers at
least one of them. I'm going to work on a nice minimal test case that
triggers these, but I didn't want to leave the bug in the tree while
I tried to trigger it.

Also, the dense map iterator checking stuff we have now is awesome. =D

llvm-svn: 288135
llvm/include/llvm/IR/PassManager.h