This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black`. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential Revision: https://reviews.llvm.org/D150782
17 lines
436 B
Python
17 lines
436 B
Python
# RUN: %python %s | FileCheck %s
|
|
|
|
from mlir_standalone.ir import *
|
|
from mlir_standalone.dialects import builtin as builtin_d, standalone as standalone_d
|
|
|
|
with Context():
|
|
standalone_d.register_dialect()
|
|
module = Module.parse(
|
|
"""
|
|
%0 = arith.constant 2 : i32
|
|
%1 = standalone.foo %0 : i32
|
|
"""
|
|
)
|
|
# CHECK: %[[C:.*]] = arith.constant 2 : i32
|
|
# CHECK: standalone.foo %[[C]] : i32
|
|
print(str(module))
|