File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
utils/bazel/llvm-project-overlay/mlir Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -128,16 +128,10 @@ gentbl_cc_library(
128
128
129
129
gentbl_cc_library (
130
130
name = "TensorEncodingIncGen" ,
131
- tbl_outs = [
132
- (
133
- ["-gen-attr-interface-decls" ],
134
- "include/mlir/IR/TensorEncInterfaces.h.inc" ,
135
- ),
136
- (
137
- ["-gen-attr-interface-defs" ],
138
- "include/mlir/IR/TensorEncInterfaces.cpp.inc" ,
139
- ),
140
- ],
131
+ tbl_outs = {
132
+ "include/mlir/IR/TensorEncInterfaces.h.inc" : ["-gen-attr-interface-decls" ],
133
+ "include/mlir/IR/TensorEncInterfaces.cpp.inc" : ["-gen-attr-interface-defs" ],
134
+ },
141
135
tblgen = ":mlir-tblgen" ,
142
136
td_file = "include/mlir/IR/TensorEncoding.td" ,
143
137
deps = [":TensorOpsTdFiles" ],
Original file line number Diff line number Diff line change @@ -397,9 +397,9 @@ def gentbl_cc_library(
397
397
name: The name of the generated cc_library rule for use in dependencies.
398
398
tblgen: The binary used to produce the output.
399
399
td_file: The primary table definitions file.
400
- tbl_outs: A list of tuples ([opts], out), where each 'opts' is a list of
401
- options passed to tblgen, each option being a string, and 'out' is the
402
- corresponding output file produced.
400
+ tbl_outs: Either a dict {out: [opts]} or a list of tuples ([opts], out),
401
+ where each 'opts' is a list of options passed to tblgen, each option
402
+ being a string, and 'out' is the corresponding output file produced.
403
403
td_srcs: See gentbl_rule.td_srcs
404
404
includes: See gentbl_rule.includes
405
405
deps: See gentbl_rule.deps
@@ -409,6 +409,8 @@ def gentbl_cc_library(
409
409
**kwargs: Extra keyword arguments to pass to all generated rules.
410
410
"""
411
411
412
+ if type (tbl_outs ) == type ({}):
413
+ tbl_outs = [(v , k ) for k , v in tbl_outs .items ()]
412
414
filegroup_name = name + "_filegroup"
413
415
gentbl_filegroup (
414
416
name = filegroup_name ,
You can’t perform that action at this time.
0 commit comments