[PredicateInfo] Use custom mangling to support ssa_copy with unnamed types.
authorFlorian Hahn <florian.hahn@arm.com>
Tue, 24 Jul 2018 14:49:52 +0000 (14:49 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Tue, 24 Jul 2018 14:49:52 +0000 (14:49 +0000)
commit36d2e25d5a834fd9609c6f2fd54482438643ad7f
treef19b0c7e2f04b1dcc370c0b419d283f75376fa20
parent28ded4ee196e89953b37f05c76b5f2647ebaa2fe
[PredicateInfo] Use custom mangling to support ssa_copy with unnamed types.

This is a workaround and it would be better to fix this generally, but
doing it generally is quite tricky. See D48541 and PR38117.

Doing it in PredicateInfo directly allows us to use the type address to
differentiate different unnamed types, because neither the created
declarations nor the ssa_copy calls should be visible after
PredicateInfo got destroyed.

Reviewers: efriedma, davide

Reviewed By: efriedma

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

llvm-svn: 337828
llvm/include/llvm/Transforms/Utils/PredicateInfo.h
llvm/lib/Transforms/Utils/PredicateInfo.cpp
llvm/test/Other/debugcounter-predicateinfo.ll
llvm/test/Transforms/NewGVN/pr33305.ll
llvm/test/Transforms/Util/PredicateInfo/condprop.ll
llvm/test/Transforms/Util/PredicateInfo/diamond.ll
llvm/test/Transforms/Util/PredicateInfo/edge.ll
llvm/test/Transforms/Util/PredicateInfo/testandor.ll
llvm/test/Transforms/Util/PredicateInfo/unnamed-types.ll [new file with mode: 0644]