llvm-project/mlir/lib
Nicolas Vasilache 047400ed82 [mlir][LLVMIR] Add support for InlineAsmOp
The InlineAsmOp mirrors the underlying LLVM semantics with a notable
exception: the embedded `asm_string` is not allowed to define or reference
any symbol or any global variable: only the operands of the op may be read,
written, or referenced.
Attempting to define or reference any symbol or any global behavior is
considered undefined behavior at this time.

The asm dialect syntax is currently specified with an integer (0 [default] for the "att dialect", 1 for the intel dialect) to circumvent the ODS limitation on string enums.

Translation to LLVM is provided and raises the fact that the asm constraints string must be well-formed with respect to in/out operands. No check is performed on the asm_string.

An InlineAsm instruction in LLVM is a special call operation to a function that is constructed on the fly.
It does not fit the current model of MLIR calls with symbols.
As a consequence, the current implementation constructs the function type in ModuleTranslation.cpp.
This should be refactored in the future.

The mlir-cpu-runner is augmented with the global initialization of the X86 asm parser to allow proper execution in JIT mode. Previously, only the X86 asm printer was initialized.

Differential revision: https://reviews.llvm.org/D92166
2020-11-30 08:32:02 +00:00
..
Analysis [mlir][BuiltinDialect] Resolve comments from D91571 2020-11-19 11:12:49 -08:00
Bindings [mlir][CAPI] Convert the rest of the API int -> bool. 2020-11-29 20:36:42 -08:00
CAPI [mlir][CAPI] Convert the rest of the API int -> bool. 2020-11-29 20:36:42 -08:00
Conversion [mlir] Fix bad rebase landed in acb69f3b7c. 2020-11-28 13:57:01 +01:00
Dialect [mlir] Add a shape function library op 2020-11-29 11:15:30 -08:00
EDSC Remove MLIREDSCInterface library which isn't used anywhere (NFC) 2020-08-18 19:04:30 +00:00
ExecutionEngine [mlir] AsyncRuntime: fix concurrency bugs + fix exports in methods definitions 2020-11-24 03:53:13 -08:00
IR Don't elide splat attributes during printing 2020-11-27 14:42:26 +00:00
Interfaces [mlir] NFC - Refactor and expose a helper printOffsetSizesAndStrides helper function. 2020-11-24 20:00:59 +00:00
Parser [mlir][BuiltinDialect] Resolve comments from D91571 2020-11-19 11:12:49 -08:00
Pass [mlir][BuiltinDialect] Resolve comments from D91571 2020-11-19 11:12:49 -08:00
Reducer [mlir] NFC: fix trivial typos 2020-10-29 04:05:22 +09:00
Rewrite [mlir][Pattern] Add a new FrozenRewritePatternList class 2020-10-26 18:01:06 -07:00
Support [mlir][BuiltinDialect] Resolve comments from D91571 2020-11-19 11:12:49 -08:00
TableGen [MLIR] ODS typedef gen fixes & improvements 2020-11-22 16:06:14 -08:00
Target [mlir][LLVMIR] Add support for InlineAsmOp 2020-11-30 08:32:02 +00:00
Transforms [mlir][DialectConversion] Do not prematurely drop unused cast operations 2020-11-26 17:39:14 +01:00
Translation [mlir][BuiltinDialect] Resolve comments from D91571 2020-11-19 11:12:49 -08:00
CMakeLists.txt [mlir][NFC] Move around the code related to PatternRewriting to improve layering 2020-10-26 18:01:06 -07:00