[PATCH] D103228: [PoC][RISCV] Using pragma to register vector intrinsic
Kito Cheng via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 4 01:08:01 PDT 2021
kito-cheng updated this revision to Diff 349784.
kito-cheng added a comment.
Changes:
- Using less invasive way to add intrinsic functions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103228/new/
https://reviews.llvm.org/D103228
Files:
clang/utils/TableGen/RISCVVEmitter.cpp
Index: clang/utils/TableGen/RISCVVEmitter.cpp
===================================================================
--- clang/utils/TableGen/RISCVVEmitter.cpp
+++ clang/utils/TableGen/RISCVVEmitter.cpp
@@ -235,9 +235,6 @@
ArrayRef<std::string> PrototypeSeq);
Optional<RVVTypePtr> computeType(BasicType BT, int Log2LMUL, StringRef Proto);
- // Emit the architecture preprocessor definitions. Return true when emits
- // non-empty string.
- bool emitExtDefStr(uint8_t Extensions, raw_ostream &o);
// Slice Prototypes string into sub prototype string and process each sub
// prototype string individually in the Handler.
void parsePrototypes(StringRef Prototypes,
@@ -1118,23 +1115,6 @@
return llvm::None;
}
-bool RVVEmitter::emitExtDefStr(uint8_t Extents, raw_ostream &OS) {
- if (Extents == RISCVExtension::Basic)
- return false;
- OS << "#if ";
- ListSeparator LS(" && ");
- if (Extents & RISCVExtension::F)
- OS << LS << "defined(__riscv_f)";
- if (Extents & RISCVExtension::D)
- OS << LS << "defined(__riscv_d)";
- if (Extents & RISCVExtension::Zfh)
- OS << LS << "defined(__riscv_zfh)";
- if (Extents & RISCVExtension::Zvamo)
- OS << LS << "defined(__riscv_zvamo)";
- OS << "\n";
- return true;
-}
-
static void emitFeatureCheckStr(uint8_t Extents, raw_ostream &OS) {
if (Extents == RISCVExtension::Basic) {
OS << 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103228.349784.patch
Type: text/x-patch
Size: 1409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210604/25b47b93/attachment.bin>
More information about the cfe-commits
mailing list