[llvm] [TableGen] Support automatic type deduction (PR #109434)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 09:14:39 PDT 2024
jurahul wrote:
Especially for code like:
```
class Intrinsic<list<LLVMType> ret_types,
list<LLVMType> param_types = [],
list<IntrinsicProperty> intr_properties = [],
string name = "",
list<SDNodeProperty> sd_properties = [],
bit disable_default_attributes = true> : SDPatternOperator {
string LLVMName = name;
string TargetPrefix = ""; // Set to a prefix for target-specific intrinsics.
list<LLVMType> RetTypes = ret_types;
list<LLVMType> ParamTypes = param_types;
```
where param_type and ret_types have their type declared, so we can avoid repeating it again in `RetTypes` and `ParamTypes`.
https://github.com/llvm/llvm-project/pull/109434
More information about the llvm-commits
mailing list