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;
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;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits