[flang-dev] [llvm-dev] About OpenMP dialect in MLIR

Michael Kruse via flang-dev flang-dev at lists.llvm.org
Fri Feb 14 12:23:30 PST 2020


Am Fr., 14. Feb. 2020 um 12:21 Uhr schrieb Vinay Madhusudan via
llvm-dev <llvm-dev at lists.llvm.org>:
> I would like to quote Chris here:
>
> “if you ignore the engineering expense, it would clearly make sense to reimplement the mid-level LLVM optimizers on top of MLIR and replace include/llvm/IR with a dialect definition in MLIR instead.“ -- http://lists.llvm.org/pipermail/llvm-dev/2020-January/138341.html

IMHO, it's not just the engineering expense, but also additional
overhead from having a more general data structure that clang does not
need. In some sense, LLVM-IR has been designed to match the semantics
of C, such that a more general representation makes less sense. There
are still opportunities, e.g. representing C++ virtual methods instead
lowering to a vtable lookup. This could make devirtualization easier.

However, it seems nobody is currently pushing for this change to
happen, there is not even an RFC on whether the community wants this
change. As such, I would not plan on using MLIR if your frontend
language is C/C++/Objective-C.

Michael


More information about the flang-dev mailing list