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)
commit25703e8fa3b3f27371d737969e0c27961f0e49dc
tree8de9cce1f3ef644cf4106355ece1eaad75943774
parenta735d521e7189cb13bd44d2604d8f5b50652fa25
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221742 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Function.cpp