CIRCT
23.0.0git
Loading...
Searching...
No Matches
include
circt
Conversion
SVLoweringUtils.h
Go to the documentation of this file.
1
//===- SVLoweringUtils.h - Shared helpers for SV lowering -------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file declares helpers shared across conversions that lower into the SV
10
// dialect.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef CIRCT_CONVERSION_SVLOWERINGUTILS_H
15
#define CIRCT_CONVERSION_SVLOWERINGUTILS_H
16
17
#include "
circt/Support/LLVM.h
"
18
#include "mlir/IR/Builders.h"
19
#include "mlir/IR/BuiltinAttributes.h"
20
#include "mlir/IR/ImplicitLocOpBuilder.h"
21
22
namespace
circt::sv
{
23
24
/// Return a reference to the shared file descriptor runtime fragment.
25
FlatSymbolRefAttr
getFileDescriptorFragmentRef
(MLIRContext *
context
);
26
27
/// Emit the shared file descriptor runtime declarations into a file-level
28
/// symbol table operation. If the builder insertion point is not directly
29
/// within `fileScopeOp`, it is temporarily adjusted. If these declarations
30
/// already exist in `fileScopeOp`, this function is a no-op.
31
void
emitFileDescriptorRuntime
(Operation *fileScopeOp,
32
ImplicitLocOpBuilder &builder);
33
34
/// Create a call to the shared file descriptor getter from a procedural region.
35
Value
createProceduralFileDescriptorGetterCall
(OpBuilder &builder, Location loc,
36
Value fileName);
37
38
}
// namespace circt::sv
39
40
#endif
// CIRCT_CONVERSION_SVLOWERINGUTILS_H
context
static std::unique_ptr< Context > context
Definition
DpiEntryPoints.cpp:37
LLVM.h
circt::sv
Definition
SVLoweringUtils.h:22
circt::sv::getFileDescriptorFragmentRef
FlatSymbolRefAttr getFileDescriptorFragmentRef(MLIRContext *context)
Return a reference to the shared file descriptor runtime fragment.
Definition
SVLoweringUtils.cpp:47
circt::sv::createProceduralFileDescriptorGetterCall
Value createProceduralFileDescriptorGetterCall(OpBuilder &builder, Location loc, Value fileName)
Create a call to the shared file descriptor getter from a procedural region.
Definition
SVLoweringUtils.cpp:130
circt::sv::emitFileDescriptorRuntime
void emitFileDescriptorRuntime(Operation *fileScopeOp, ImplicitLocOpBuilder &builder)
Emit the shared file descriptor runtime declarations into a file-level symbol table operation.
Definition
SVLoweringUtils.cpp:51
Generated on Wed Apr 29 2026 00:22:32 for CIRCT by
1.9.8