Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
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
lvzhengyang
abc
Commits
a7339fdb
Commit
a7339fdb
authored
Jun 18, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix constant propagation after 'if'.
parent
91f06107
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
src/base/abc/abcUtil.c
+14
-0
No files found.
src/base/abc/abcUtil.c
View file @
a7339fdb
...
...
@@ -964,6 +964,20 @@ int Abc_NtkLogicMakeSimpleCos( Abc_Ntk_t * pNtk, int fDuplicate )
assert
(
Abc_NtkIsLogic
(
pNtk
)
);
LevelMax
=
Abc_NtkLevel
(
pNtk
);
// fix constant drivers
Abc_NtkForEachCo
(
pNtk
,
pNode
,
i
)
{
pDriver
=
Abc_ObjFanin0
(
pNode
);
if
(
!
Abc_NodeIsConst
(
pDriver
)
)
continue
;
pDriverNew
=
(
Abc_ObjFaninC0
(
pNode
)
==
Abc_NodeIsConst0
(
pDriver
))
?
Abc_NtkCreateNodeConst1
(
pNtk
)
:
Abc_NtkCreateNodeConst0
(
pNtk
);
if
(
Abc_ObjFaninC0
(
pNode
)
)
Abc_ObjXorFaninC
(
pNode
,
0
);
Abc_ObjPatchFanin
(
pNode
,
pDriver
,
pDriverNew
);
if
(
Abc_ObjFanoutNum
(
pDriver
)
==
0
)
Abc_NtkDeleteObj
(
pDriver
);
}
// collect drivers pointed by complemented edges
vDrivers
=
Vec_PtrAlloc
(
100
);
Abc_NtkIncrementTravId
(
pNtk
);
...
...
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