[llvm] [ValueTypes][NFC] Generate EVT::getTypeForEVT from GenVT.inc (PR #96608)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 01:54:49 PDT 2024
================
@@ -34,16 +35,22 @@ class VTAny<int value> : ValueType<0, value> {
class VTInt<int size, int value>
: ValueType<size, value> {
+ let LLVMTyForEVT = !strconcat("Type::getIntNTy(Context, ",
+ !cast<string>(size), ")");
let isInteger = true;
}
-class VTFP<int size, int value>
+class VTFP<int size, string LLVMTy, int value>
: ValueType<size, value> {
+ let LLVMTyForEVT = !strconcat("Type::get", LLVMTy, "(Context)");
----------------
arsenm wrote:
I think it's probably more natural to just have tablegen directly emit the code for these, rather than splitting the code emission logic into strings in the td files and the emitter
https://github.com/llvm/llvm-project/pull/96608
More information about the llvm-commits
mailing list