diff options
author | Reid Kleckner <rnk@google.com> | 2016-01-26 00:55:00 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-01-26 00:55:00 +0000 |
commit | 86ff2689a5e6050e24a9bc11aea1364169d7299f (patch) | |
tree | 1c74a9abf7673b37cff0be1560369d2c791344f6 /llvm/utils/TableGen | |
parent | 242b8bb58dee9556e310e7f57f654dc64c6fad7b (diff) | |
download | bcm5719-llvm-86ff2689a5e6050e24a9bc11aea1364169d7299f.tar.gz bcm5719-llvm-86ff2689a5e6050e24a9bc11aea1364169d7299f.zip |
Sort intrinsics by LLVM intrinsic name, rather than tablegen def name
Step one towards using a simple binary search to lookup intrinsic IDs
instead of our crazy table generated switch+memcmp+startswith code that
makes Function.cpp take about a minute to compile. See PR24785 and
PR11951 for why we should do this.
The X86 backend contains tables that need to be sorted on intrinsic ID,
so reorder those.
llvm-svn: 258757
Diffstat (limited to 'llvm/utils/TableGen')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index a22418c6eae..7c2c60147ca 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -447,6 +447,10 @@ std::vector<CodeGenIntrinsic> llvm::LoadIntrinsics(const RecordKeeper &RC, if (isTarget == TargetOnly) Result.push_back(CodeGenIntrinsic(I[i])); } + std::sort(Result.begin(), Result.end(), + [](CodeGenIntrinsic LHS, CodeGenIntrinsic RHS) { + return LHS.Name < RHS.Name; + }); return Result; } |