[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)
Sander de Smalen via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 6 08:40:05 PST 2023
================
@@ -1180,6 +1194,32 @@ void SVEEmitter::createIntrinsic(
}
}
+void SVEEmitter::createCoreHeaderIntrinsics(raw_ostream &OS,
+ SVEEmitter &Emitter,
+ ACLEKind Kind) {
+ SmallVector<std::unique_ptr<Intrinsic>, 128> Defs;
+ std::vector<Record *> RV = Records.getAllDerivedDefinitions("Inst");
+ for (auto *R : RV)
+ createIntrinsic(R, Defs);
+
+ // Sort intrinsics in header file by following order/priority:
+ // - Architectural guard (i.e. does it require SVE2 or SVE2_AES)
+ // - Class (is intrinsic overloaded or not)
+ // - Intrinsic name
+ std::stable_sort(
+ Defs.begin(), Defs.end(), [](const std::unique_ptr<Intrinsic> &A,
+ const std::unique_ptr<Intrinsic> &B) {
+ auto ToTuple = [](const std::unique_ptr<Intrinsic> &I) {
+ return std::make_tuple(I->getGuard(), (unsigned)I->getClassKind(), I->getName());
----------------
sdesmalen-arm wrote:
80char formatting.
https://github.com/llvm/llvm-project/pull/69725
More information about the cfe-commits
mailing list