merging of types. This makes it MUCH more efficient than before, also making things simpler. llvm-svn: 8833