LLVM IR Dialect conversion: use builder arguments instead of named attributes
authorAlex Zinenko <zinenko@google.com>
Thu, 7 Mar 2019 14:41:17 +0000 (06:41 -0800)
committerjpienaar <jpienaar@google.com>
Sat, 30 Mar 2019 00:05:20 +0000 (17:05 -0700)
commit6621f39d192ac4e2014b7184ae40fcbff474c046
treec92b3b7d5b8daebb7ea163c5b0a86e4f6a40b8d5
parentb9724e98c250c1e557c69e04f47bc5edea2f8db3
LLVM IR Dialect conversion: use builder arguments instead of named attributes

The first version of TableGen-defined LLVM IR Dialect did not include the
mandatory or optional attributes of the operations due to the missing support
for some of the relevant attribute types.  This support has been recently
introduced, along with named attributes as arguments in the TableGen operation
definitions.  With these changes, LLVM IR Dialect operations now have factory
functions accepting (unnamed) attributes and attaching their canonical names.
Use these factories instead of manually constructing named attributes in the
dialect convreter to avoid hardcoded attribute names in unexpected places.

PiperOrigin-RevId: 237237769
mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp