[TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.
authorFrancesco Petrogalli <francesco.petrogalli@apple.com>
Tue, 10 Jan 2023 21:09:06 +0000 (22:09 +0100)
committerFrancesco Petrogalli <francesco.petrogalli@apple.com>
Wed, 11 Jan 2023 09:00:04 +0000 (10:00 +0100)
commitcf7a8305a2b4ddfd299c748136cb9a2960ef7089
tree13363107aed60711e94671d9167f85399524893d
parentcddcbfae14181538963c83320ae78f085dad2576
[TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

This patch removes the file `llvm/include/llvm/TargetParser/RISCVTargetParser.def` and replaces it with a tablegen-generated `.inc` file out of `llvm/lib/Target/RISCV/RISCV.td`.

The module system has been updated to make sure we can build clang/llvm with `-DLLVM_ENABLE_MODULES=On`

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D137517
19 files changed:
clang/lib/Basic/Targets/RISCV.cpp
clang/lib/Driver/ToolChains/Arch/RISCV.cpp
llvm/include/llvm/CMakeLists.txt
llvm/include/llvm/TargetParser/CMakeLists.txt [new file with mode: 0644]
llvm/include/llvm/TargetParser/RISCVTargetParser.def [deleted file]
llvm/include/llvm/TargetParser/RISCVTargetParser.h [new file with mode: 0644]
llvm/include/llvm/TargetParser/TargetParser.h
llvm/include/llvm/module.extern.modulemap
llvm/include/llvm/module.install.modulemap
llvm/include/llvm/module.modulemap
llvm/lib/Target/RISCV/RISCV.td
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/TargetParser/CMakeLists.txt
llvm/lib/TargetParser/RISCVTargetParser.cpp [new file with mode: 0644]
llvm/lib/TargetParser/TargetParser.cpp
llvm/utils/TableGen/CMakeLists.txt
llvm/utils/TableGen/RISCVTargetDefEmitter.cpp [new file with mode: 0644]
llvm/utils/TableGen/TableGen.cpp
llvm/utils/TableGen/TableGenBackends.h