Decouple LLVM dialect from Standard dialect
authorAlex Zinenko <zinenko@google.com>
Mon, 15 Jul 2019 13:19:39 +0000 (06:19 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 16 Jul 2019 20:43:31 +0000 (13:43 -0700)
commitec82e1c907a3696a063d19e8a266f9bc50f5f625
treecae57ec14de9bb9371eb00f1f935d94bfa7a1ac1
parentc3d166c5325371559657b7078766eab046d3b1f0
Decouple LLVM dialect from Standard dialect

Due to the absence of ODS support for enum attributes, the implementation of
the LLVM dialect `icmp` operation was reusing the comparison predicate from the
Standard dialect, creating an avoidable library dependency.  With ODS support
and ICmpPredicate attribute recently introduced, the dependency is no longer
justified.  Update the Standard to LLVM convresion to also convert the
CmpIPredicate into LLVM::ICmpPredicate and remove the unnecessary includes.

Note that the MLIRLLVMIR library did not explicitly depend on MLIRStandardOps,
requiring dependees of MLIRLLVMIR to also depend on MLIRStandardOps, which
should no longer be the case.

PiperOrigin-RevId: 258148456
mlir/include/mlir/LLVMIR/LLVMOps.td
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
mlir/lib/LLVMIR/IR/LLVMDialect.cpp
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp