|
| 1 | +// This file is part of solidity. |
| 2 | + |
| 3 | +// solidity is free software: you can redistribute it and/or modify |
| 4 | +// it under the terms of the GNU General Public License as published by |
| 5 | +// the Free Software Foundation, either version 3 of the License, or |
| 6 | +// (at your option) any later version. |
| 7 | + |
| 8 | +// solidity is distributed in the hope that it will be useful, |
| 9 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | +// GNU General Public License for more details. |
| 12 | + |
| 13 | +// You should have received a copy of the GNU General Public License |
| 14 | +// along with solidity. If not, see <http://www.gnu.org/licenses/>. |
| 15 | + |
| 16 | +// SPDX-License-Identifier: GPL-3.0 |
| 17 | + |
| 18 | +// |
| 19 | +// Yul dialect |
| 20 | +// |
| 21 | + |
| 22 | +#ifndef MLIR_YUL_YULBASE_TD |
| 23 | +#define MLIR_YUL_YULBASE_TD |
| 24 | + |
| 25 | +include "mlir/IR/OpBase.td" |
| 26 | +include "mlir/Interfaces/InferTypeOpInterface.td" |
| 27 | +include "mlir/Interfaces/SideEffectInterfaces.td" |
| 28 | + |
| 29 | +//===----------------------------------------------------------------------===// |
| 30 | +// Dialect |
| 31 | +//===----------------------------------------------------------------------===// |
| 32 | + |
| 33 | +def Yul_Dialect : Dialect { |
| 34 | + let name = "yul"; |
| 35 | + let cppNamespace = "::mlir::yul"; |
| 36 | + let hasConstantMaterializer = 1; |
| 37 | +} |
| 38 | + |
| 39 | +//===----------------------------------------------------------------------===// |
| 40 | +// Types |
| 41 | +//===----------------------------------------------------------------------===// |
| 42 | + |
| 43 | +def I256 : I<256>; |
| 44 | + |
| 45 | +//===----------------------------------------------------------------------===// |
| 46 | +// Attributes |
| 47 | +//===----------------------------------------------------------------------===// |
| 48 | + |
| 49 | +def I256Attr : SignlessIntegerAttrBase<I256, |
| 50 | + "256-bit signless integer attribute">; |
| 51 | + |
| 52 | +//===----------------------------------------------------------------------===// |
| 53 | +// Op classes |
| 54 | +//===----------------------------------------------------------------------===// |
| 55 | + |
| 56 | +class Yul_Op<string mnemonic, list<Trait> traits = []> : Op<Yul_Dialect, |
| 57 | + mnemonic, traits>; |
| 58 | + |
| 59 | +#endif // MLIR_YUL_YULBASE_TD |
0 commit comments