mirror of
https://github.com/YosysHQ/yosys
synced 2026-03-02 03:36:56 +00:00
opt_clean: refactor
This commit is contained in:
parent
5d3b3ff18d
commit
d33acfe65f
7 changed files with 15 additions and 53 deletions
|
|
@ -1,5 +1,10 @@
|
|||
OBJS += passes/opt/opt_clean/cells_all.o
|
||||
OBJS += passes/opt/opt_clean/cells_temp.o
|
||||
OBJS += passes/opt/opt_clean/wires.o
|
||||
OBJS += passes/opt/opt_clean/inits.o
|
||||
OBJS += passes/opt/opt_clean/opt_clean.o
|
||||
OPT_CLEAN_OBJS =
|
||||
OPT_CLEAN_OBJS += passes/opt/opt_clean/cells_all.o
|
||||
OPT_CLEAN_OBJS += passes/opt/opt_clean/cells_temp.o
|
||||
OPT_CLEAN_OBJS += passes/opt/opt_clean/wires.o
|
||||
OPT_CLEAN_OBJS += passes/opt/opt_clean/inits.o
|
||||
OPT_CLEAN_OBJS += passes/opt/opt_clean/opt_clean.o
|
||||
|
||||
$(OPT_CLEAN_OBJS): passes/opt/opt_clean/opt_clean.h
|
||||
|
||||
OBJS += $(OPT_CLEAN_OBJS)
|
||||
|
|
|
|||
|
|
@ -17,15 +17,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "kernel/register.h"
|
||||
#include "kernel/sigtools.h"
|
||||
#include "kernel/log.h"
|
||||
#include "kernel/celltypes.h"
|
||||
#include "kernel/ffinit.h"
|
||||
#include "kernel/threading.h"
|
||||
#include "kernel/yosys_common.h"
|
||||
#include "passes/opt/opt_clean/keep_cache.h"
|
||||
#include "passes/opt/opt_clean/shared.h"
|
||||
#include "passes/opt/opt_clean/opt_clean.h"
|
||||
|
||||
YOSYS_NAMESPACE_BEGIN
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "kernel/register.h"
|
||||
#include "kernel/sigtools.h"
|
||||
#include "kernel/log.h"
|
||||
#include "kernel/celltypes.h"
|
||||
#include "kernel/ffinit.h"
|
||||
#include "kernel/threading.h"
|
||||
#include "kernel/yosys_common.h"
|
||||
#include "passes/opt/opt_clean/shared.h"
|
||||
#include "passes/opt/opt_clean/opt_clean.h"
|
||||
|
||||
USING_YOSYS_NAMESPACE
|
||||
PRIVATE_NAMESPACE_BEGIN
|
||||
|
|
|
|||
|
|
@ -17,14 +17,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "kernel/register.h"
|
||||
#include "kernel/sigtools.h"
|
||||
#include "kernel/log.h"
|
||||
#include "kernel/celltypes.h"
|
||||
#include "kernel/ffinit.h"
|
||||
#include "kernel/threading.h"
|
||||
#include "kernel/yosys_common.h"
|
||||
#include "passes/opt/opt_clean/shared.h"
|
||||
#include "passes/opt/opt_clean/opt_clean.h"
|
||||
|
||||
USING_YOSYS_NAMESPACE
|
||||
PRIVATE_NAMESPACE_BEGIN
|
||||
|
|
|
|||
|
|
@ -18,22 +18,12 @@
|
|||
*/
|
||||
|
||||
#include "kernel/register.h"
|
||||
#include "kernel/sigtools.h"
|
||||
#include "kernel/log.h"
|
||||
#include "kernel/celltypes.h"
|
||||
#include "kernel/ffinit.h"
|
||||
#include "kernel/threading.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <set>
|
||||
#include "passes/opt/opt_clean/shared.h"
|
||||
#include "passes/opt/opt_clean/keep_cache.h"
|
||||
#include "passes/opt/opt_clean/opt_clean.h"
|
||||
|
||||
USING_YOSYS_NAMESPACE
|
||||
PRIVATE_NAMESPACE_BEGIN
|
||||
|
||||
using RTLIL::id2cstr;
|
||||
|
||||
void rmunused_module(RTLIL::Module *module, bool rminit, CleanRunContext &clean_ctx)
|
||||
{
|
||||
if (clean_ctx.flags.verbose)
|
||||
|
|
|
|||
|
|
@ -18,10 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "kernel/rtlil.h"
|
||||
#include "kernel/sigtools.h"
|
||||
#include "kernel/threading.h"
|
||||
#include "kernel/celltypes.h"
|
||||
#include "kernel/yosys_common.h"
|
||||
#include "passes/opt/opt_clean/keep_cache.h"
|
||||
|
||||
#ifndef OPT_CLEAN_SHARED_H
|
||||
|
|
@ -29,7 +26,6 @@
|
|||
|
||||
YOSYS_NAMESPACE_BEGIN
|
||||
|
||||
|
||||
struct AnalysisContext {
|
||||
SigMap assign_map;
|
||||
const RTLIL::Module *mod;
|
||||
|
|
@ -17,15 +17,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "kernel/register.h"
|
||||
#include "kernel/sigtools.h"
|
||||
#include "kernel/log.h"
|
||||
#include "kernel/celltypes.h"
|
||||
#include "kernel/ffinit.h"
|
||||
#include "kernel/threading.h"
|
||||
#include "kernel/yosys_common.h"
|
||||
#include "passes/opt/opt_clean/shared.h"
|
||||
#include "passes/opt/opt_clean/parallel.h"
|
||||
#include "passes/opt/opt_clean/opt_clean.h"
|
||||
|
||||
USING_YOSYS_NAMESPACE
|
||||
PRIVATE_NAMESPACE_BEGIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue