dnsampaio created this revision. dnsampaio added reviewers: t.p.northover, ostannard. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang.
The declaration of arm neon intrinsics that are "big endian safe" print the same code for big and small endian targets. This patch avoids duplicates by checking if an intrinsic is safe to have a single definition. (decreases header 6030 lines out of 73k). Repository: rC Clang https://reviews.llvm.org/D66588 Files: utils/TableGen/NeonEmitter.cpp Index: utils/TableGen/NeonEmitter.cpp =================================================================== --- utils/TableGen/NeonEmitter.cpp +++ utils/TableGen/NeonEmitter.cpp @@ -1889,6 +1889,11 @@ } std::string Intrinsic::generate() { + // Avoid duplicated code for big and small endians + if (BigEndianSafe) { + generateImpl(false, "", ""); + return OS.str(); + } // Little endian intrinsics are simple and don't require any argument // swapping. OS << "#ifdef __LITTLE_ENDIAN__\n";
Index: utils/TableGen/NeonEmitter.cpp =================================================================== --- utils/TableGen/NeonEmitter.cpp +++ utils/TableGen/NeonEmitter.cpp @@ -1889,6 +1889,11 @@ } std::string Intrinsic::generate() { + // Avoid duplicated code for big and small endians + if (BigEndianSafe) { + generateImpl(false, "", ""); + return OS.str(); + } // Little endian intrinsics are simple and don't require any argument // swapping. OS << "#ifdef __LITTLE_ENDIAN__\n";
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits