LLZK
3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Toggle main menu visibility
Loading...
Searching...
No Matches
InitializerUtils.h
Go to the documentation of this file.
1
//===-- InitializerUtils.h - Global initializer normalization ---*- C++ -*-===//
2
//
3
// Part of the LLZK Project, under the Apache License v2.0.
4
// See LICENSE.txt for license information.
5
// Copyright 2026 Project LLZK
6
// SPDX-License-Identifier: Apache-2.0
7
//
8
//===----------------------------------------------------------------------===//
9
10
#pragma once
11
12
#include "
llzk/Util/ErrorHelper.h
"
13
14
#include <mlir/IR/Attributes.h>
15
16
namespace
llzk::global
{
17
19
struct
NormalizedGlobalInitializer
{
20
mlir::Type
type
;
21
mlir::Attribute
value
;
22
};
23
28
mlir::FailureOr<NormalizedGlobalInitializer>
29
normalizeGlobalInitializer
(mlir::Type type, mlir::Attribute value,
EmitErrorFn
emitError);
30
31
}
// namespace llzk::global
ErrorHelper.h
llzk::global
Definition
InitializerUtils.h:16
llzk::global::normalizeGlobalInitializer
mlir::FailureOr< NormalizedGlobalInitializer > normalizeGlobalInitializer(mlir::Type type, mlir::Attribute value, EmitErrorFn emitError)
Normalize unambiguous initializer representations and their declared type.
llzk::EmitErrorFn
llvm::function_ref< InFlightDiagnosticWrapper()> EmitErrorFn
Callback to produce an error diagnostic.
Definition
ErrorHelper.h:145
llzk::global::NormalizedGlobalInitializer
A global initializer and its normalized type.
Definition
InitializerUtils.h:19
llzk::global::NormalizedGlobalInitializer::value
mlir::Attribute value
Definition
InitializerUtils.h:21
llzk::global::NormalizedGlobalInitializer::type
mlir::Type type
Definition
InitializerUtils.h:20
lib
Dialect
Global
IR
InitializerUtils.h
Generated by
1.17.0
Copyright 2025 Veridise Inc. under the Apache License v2.0. Copyright 2026 Project LLZK under the Apache License v2.0.