This is exposing the basic functionalities (create, nest, addPass, run) of the PassManager through the C API in the new header: `include/mlir-c/Pass.h`. In order to exercise it in the unit-test, a basic TableGen backend is also provided to generate a simple C wrapper around the pass constructor. It is used to expose the libTransforms passes to the C API. Reviewed By: stellaraccident, ftynse Differential Revision: https://reviews.llvm.org/D90667
24 lines
606 B
C++
24 lines
606 B
C++
//===- CAPIPAsses.cpp - C API for Tranformations Passes -------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "mlir/Transforms/Passes.h"
|
|
#include "mlir/CAPI/Pass.h"
|
|
#include "mlir/Pass/Pass.h"
|
|
|
|
using namespace mlir;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "mlir/Transforms/Transforms.capi.cpp.inc"
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|