OSDN Git Service

[IR] Split Intrinsics.inc into enums and implementations
authorReid Kleckner <rnk@google.com>
Sat, 23 Jun 2018 02:02:38 +0000 (02:02 +0000)
committerReid Kleckner <rnk@google.com>
Sat, 23 Jun 2018 02:02:38 +0000 (02:02 +0000)
commitaf7c445dfa13a56ba82be0ddfcfc75bd86f96ab9
treeebcd884faff9ea293dd62869e230e01e0da74a42
parentdc14c20b63ebff426c8bf3f42984762e52e91597
[IR] Split Intrinsics.inc into enums and implementations

Implements PR34259

Intrinsics.h is a very popular header. Most LLVM TUs care about things
like dbg_value, but they don't care how they are implemented. After I
split these out, IntrinsicImpl.inc is 1.7 MB, so this saves each LLVM TU
from scanning 1.7 MB of source that gets pre-processed away.

It also means we can modify intrinsic properties without triggering a
full rebuild, but that's probably less of a win.

I think the next best thing to do would be to split out the target
intrinsics into their own header. Very, very few TUs care about
target-specific intrinsics. It's very hard to split up the target
independent intrinsics like llvm.expect, assume, and dbg.value, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335407 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/CMakeLists.txt
include/llvm/IR/Intrinsics.h
lib/IR/Function.cpp
lib/Target/AMDGPU/CMakeLists.txt
test/TableGen/intrinsic-long-name.td
test/TableGen/intrinsic-struct.td
test/TableGen/intrinsic-varargs.td
utils/TableGen/IntrinsicEmitter.cpp
utils/TableGen/TableGen.cpp
utils/TableGen/TableGenBackends.h