The logic at the end of TailDuplicate seems dead - can we remove it?

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 11:31:19 PDT 2016


There's some code near the end of TailDuplicate to handle "the nasty
case in that we duplicated a block that is part of a loop into some but
not all of its predecessors."

I noticed that this isn't covered by our existing tests and spent some
time trying to come up with an example it actually hits. I tried hand
rolling something based on the explanation in the comment, but couldn't
get anything that didn't abort tail duplication earlier for one reason
or another.

Then, I applied the attached patch (with tail-dup-size cranked up so
this would fire more) and ran a bootstrap of clang and the nightly test
suite - the assert was never hit.

I suspect that things have changed and the situation this code handles
can't happen anymore. Should we remove it?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tail-dup-dead-code.patch
Type: text/x-patch
Size: 1728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160331/91564fa0/attachment.bin>


More information about the llvm-commits mailing list