Extend intrinsic name mangling to support arrays, named structs, and function types.
authorPhilip Reames <listmail@philipreames.com>
Wed, 12 Nov 2014 00:21:51 +0000 (00:21 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 12 Nov 2014 00:21:51 +0000 (00:21 +0000)
commit319c48eb2d03623a3f981cfd1dcce356be40acb7
tree04033e7bb63e2e198bde470fe9508d1293e6d159
parent12fb0057d12ea5bbb0a4a041543feb574c1d4e5b
Extend intrinsic name mangling to support arrays, named structs, and function types.

Currently, we have a type parameter mechanism for intrinsics. Rather than having to specify a separate intrinsic for each combination of argument and return types, we can specify a single intrinsic with one or more type parameters. These type parameters are passed explicitly to Intrinsic::getDeclaration or can be specified implicitly in the naming of the intrinsic function in an LL file.

Today, the types are limited to integer, floating point, and pointer types. With a goal of supporting symbolic targets for patchpoints and statepoints, this change adds support for function types.  The change also includes support for first class aggregate types (named structures and arrays) since these appear in function types we've encountered.

Reviewed by: atrick, ributzka
Differential Revision: http://reviews.llvm.org/D4608

llvm-svn: 221742
llvm/lib/IR/Function.cpp