commit | f3b1361f35fcbd2b551f224bebc4068d7de8c3d2 | [log] [tgz] |
---|---|---|
author | Markus Böck <[email protected]> | Thu Aug 10 07:56:59 2023 |
committer | Markus Böck <[email protected]> | Thu Aug 10 10:38:54 2023 |
tree | 8e2ea24d94d2312a97b1aa98064390a121f59e47 | |
parent | 5b29f86b42bab223ed8b9f2738802138aade74e0 [diff] |
[mlir] Generate constructor in generic adaptors allowing construction from an op instance In essentially all occurrences of adaptor constructions in the codebase, an instance of the op is available and only a different value range is being used. Nevertheless, one had to perform the ritual of calling and pass `getAttrDictionary()`, `getProperties` and `getRegions` manually. This patch changes that by teaching TableGen to generate a new constructor in the adaptor that is constructable using `GenericAdaptor(valueRange, op)`. The (discardable) attr dictionary, properties and the regions are then taken directly from the passed op, with only the value range being taken from the first parameter. This simplifies a lot of code and also guarantees that all the various getters of the adaptor work in all scenarios. Differential Revision: https://reviews.llvm.org/D157516
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.