Loading [MathJax]/extensions/tex2jax.js
CIRCT
21.0.0git
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
i
k
l
m
n
o
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
m
o
p
r
s
t
u
w
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
Enumerations
Enumerator
a
b
c
d
f
i
m
n
o
p
r
s
t
u
v
w
x
z
Related Symbols
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Variables
c
e
g
i
l
m
n
p
r
s
t
w
Typedefs
b
c
d
e
f
h
i
j
l
m
n
o
p
r
s
u
v
Enumerations
Enumerator
a
c
d
f
h
i
n
o
r
Macros
a
c
d
e
g
h
i
r
s
t
v
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
lib
Support
Debug.cpp
Go to the documentation of this file.
1
//===- Debug.cpp - Debug Utilities ------------------------------*- 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
// Utilities related to generating run-time debug information.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
circt/Support/Debug.h
"
14
15
#include "llvm/ADT/Twine.h"
16
#include "llvm/Support/Debug.h"
17
18
llvm::raw_ostream &
circt::debugHeader
(llvm::StringRef str,
int
width) {
19
auto
&dbgStream = llvm::dbgs();
20
dbgStream <<
"===- "
<< str <<
" "
;
21
width -= 6 + str.size();
22
if
(width > 3) {
23
dbgStream << std::string(width - 3,
'-'
);
24
width = 3;
25
}
26
if
(width > 0)
27
dbgStream << std::string(width,
'='
);
28
return
dbgStream;
29
}
18
llvm::raw_ostream &
circt::debugHeader
(llvm::StringRef str,
int
width) {
…
}
30
31
llvm::raw_ostream &
circt::debugPassHeader
(
const
mlir::Pass *pass,
int
width) {
32
return
debugHeader
((llvm::Twine(
"Running "
) + pass->getName()).str());
33
}
31
llvm::raw_ostream &
circt::debugPassHeader
(
const
mlir::Pass *pass,
int
width) {
…
}
34
35
llvm::raw_ostream &
circt::debugFooter
(
int
width) {
36
auto
&dbgStream = llvm::dbgs();
37
if
(width > 3) {
38
int
startWidth = std::min(width - 3, 3);
39
dbgStream << std::string(startWidth,
'='
);
40
width -= startWidth;
41
}
42
if
(width > 3) {
43
dbgStream << std::string(width - 3,
'-'
);
44
width = 3;
45
}
46
if
(width > 0)
47
dbgStream << std::string(width,
'='
);
48
return
dbgStream;
49
}
35
llvm::raw_ostream &
circt::debugFooter
(
int
width) {
…
}
Debug.h
circt::debugHeader
llvm::raw_ostream & debugHeader(llvm::StringRef str, int width=80)
Write a "header"-like string to the debug stream with a certain width.
Definition
Debug.cpp:18
circt::debugPassHeader
llvm::raw_ostream & debugPassHeader(const mlir::Pass *pass, int width=80)
Write a boilerplate header for a pass to the debug stream.
Definition
Debug.cpp:31
circt::debugFooter
llvm::raw_ostream & debugFooter(int width=80)
Write a boilerplate footer to the debug stream to indicate that a pass has ended.
Definition
Debug.cpp:35
Generated on Tue Apr 22 2025 00:08:31 for CIRCT by
1.9.8