Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llvm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
llvm-watermarker
Commits
97558d89
Commit
97558d89
authored
Nov 16, 2018
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出力を関数毎のみに変更
parent
b8e98f4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
BlockCounterPass.cpp
src/nykk/pass/BlockCounterPass.cpp
+7
-5
No files found.
src/nykk/pass/BlockCounterPass.cpp
View file @
97558d89
...
...
@@ -19,6 +19,7 @@ namespace
*/
explicit
BlockCounterPass
()
:
FunctionPass
(
ID
)
,
module_name_
()
{
}
...
...
@@ -40,8 +41,7 @@ namespace
*/
bool
doInitialization
(
llvm
::
Module
&
module
)
override
{
llvm
::
errs
()
<<
"[BlockCounter - module ] start: "
<<
module
.
getName
()
<<
"
\n
"
;
module_name_
=
module
.
getName
();
return
false
;
}
...
...
@@ -55,8 +55,7 @@ namespace
*/
bool
doFinalization
(
llvm
::
Module
&
module
)
override
{
llvm
::
errs
()
<<
"[BlockCounter - module ] finish: "
<<
module
.
getName
()
<<
"
\n
"
;
module_name_
.
clear
();
return
false
;
}
...
...
@@ -71,10 +70,13 @@ namespace
bool
runOnFunction
(
llvm
::
Function
&
func
)
override
{
llvm
::
errs
()
<<
"[BlockCounter -
function ] '"
<<
func
.
getName
()
<<
"'
Basic blocks: "
<<
func
.
getBasicBlockList
().
size
()
<<
"
\n
"
;
<<
"[BlockCounter -
'"
<<
func
.
getName
()
<<
"' in "
<<
module_name_
<<
"]
Basic blocks: "
<<
func
.
getBasicBlockList
().
size
()
<<
"
\n
"
;
return
false
;
}
private
:
std
::
string
module_name_
;
};
char
BlockCounterPass
::
ID
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment