Change Type::isAbstract to have better comments, a more correct name
authorChris Lattner <sabre@nondot.org>
Wed, 6 Oct 2004 16:36:46 +0000 (16:36 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 6 Oct 2004 16:36:46 +0000 (16:36 +0000)
commitb5c16705fdf778f5f1dfbfdf67218932f1d8ca7d
tree9d64f5fe226cdaffe56a443e3a80a058f76bc719
parentdf00115aa4ee3fd400cc32889a353a461a471daa
Change Type::isAbstract to have better comments, a more correct name
(PromoteAbstractToConcrete), and to use a set to avoid recomputation.
In particular, this set eliminates the potentially exponential cases
from this little recursive algorithm.

On a particularly nasty testcase, llvm-dis on the .bc file went from 34
minutes (which is when I killed it, it still hadn't finished) to 0.57s.
Remember kids, exponential algorithms are bad.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16772 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/Type.cpp