[Local] Zap blockaddress without users in ConstantFoldTerminator.
authorFlorian Hahn <flo@fhahn.com>
Sat, 20 Jul 2019 12:25:47 +0000 (12:25 +0000)
committerFlorian Hahn <flo@fhahn.com>
Sat, 20 Jul 2019 12:25:47 +0000 (12:25 +0000)
commit0a7faa4e3d9ff9f8eebc8be6a85123c5e5f50103
tree49ed08c7bc85356df965a508411e9de283b24c46
parentcbd28cd05bb11e9d76d71c6cc2d38d89dbb1fe1a
[Local] Zap blockaddress without users in ConstantFoldTerminator.

If the blockaddress is not destoryed, the destination block will still
be marked as having its address taken, limiting further transformations.

I think there are other places where the dead blockaddress constants are kept
around, I'll look into that as follow up.

Reviewers: craig.topper, brzycki, davide

Reviewed By: brzycki, davide

Differential Revision: https://reviews.llvm.org/D64936

llvm-svn: 366633
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/SimplifyCFG/dce-cond-after-folding-terminator.ll