From 431bb1ed165b0e3ec7731b17af4df84f83c79739 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 17 Oct 2023 22:49:28 -0400 Subject: [PATCH] Support compiling Verilator with gcc/clang precompiled headers (#4579) --- Changes | 1 + configure.ac | 15 +++++ src/Makefile_obj.in | 126 +++++++++++++++++++++++-------------- src/V3Active.cpp | 7 +-- src/V3ActiveTop.cpp | 7 +-- src/V3Assert.cpp | 8 +-- src/V3AssertPre.cpp | 7 +-- src/V3Ast.cpp | 7 +-- src/V3AstNodes.cpp | 2 + src/V3Begin.cpp | 10 +-- src/V3Branch.cpp | 10 +-- src/V3Broken.cpp | 6 +- src/V3CCtors.cpp | 7 +-- src/V3CUse.cpp | 12 +--- src/V3Case.cpp | 9 +-- src/V3Cast.cpp | 10 +-- src/V3Class.cpp | 7 +-- src/V3Clean.cpp | 10 +-- src/V3Clock.cpp | 9 +-- src/V3Combine.cpp | 7 +-- src/V3Common.cpp | 7 +-- src/V3Config.cpp | 6 +- src/V3Coverage.cpp | 9 +-- src/V3CoverageJoin.cpp | 6 +- src/V3Dead.cpp | 9 +-- src/V3Delayed.cpp | 9 +-- src/V3Depth.cpp | 9 +-- src/V3DepthBlock.cpp | 9 +-- src/V3Descope.cpp | 9 +-- src/V3Dfg.cpp | 5 +- src/V3DfgAstToDfg.cpp | 8 +-- src/V3DfgDecomposition.cpp | 5 +- src/V3DfgDfgToAst.cpp | 6 +- src/V3DfgOptimizer.cpp | 8 +-- src/V3DfgPasses.cpp | 6 +- src/V3DfgPeephole.cpp | 6 +- src/V3DupFinder.cpp | 9 +-- src/V3EmitCBase.cpp | 3 +- src/V3EmitCConstPool.cpp | 5 +- src/V3EmitCFunc.cpp | 5 +- src/V3EmitCHeaders.cpp | 5 +- src/V3EmitCImp.cpp | 6 +- src/V3EmitCInlines.cpp | 4 +- src/V3EmitCMain.cpp | 6 +- src/V3EmitCMake.cpp | 6 +- src/V3EmitCModel.cpp | 6 +- src/V3EmitCSyms.cpp | 6 +- src/V3EmitMk.cpp | 6 +- src/V3EmitV.cpp | 6 +- src/V3EmitXml.cpp | 7 +-- src/V3Expand.cpp | 9 +-- src/V3File.cpp | 5 +- src/V3Force.cpp | 7 +-- src/V3Fork.cpp | 10 +-- src/V3Gate.cpp | 8 +-- src/V3Global.cpp | 6 +- src/V3Hasher.cpp | 3 +- src/V3HierBlock.cpp | 4 +- src/V3Inline.cpp | 9 +-- src/V3Inst.cpp | 9 +-- src/V3InstrCount.cpp | 7 +-- src/V3Interface.cpp | 8 +-- src/V3Life.cpp | 8 +-- src/V3LifePost.cpp | 7 +-- src/V3LinkCells.cpp | 9 +-- src/V3LinkDot.cpp | 9 +-- src/V3LinkInc.cpp | 8 +-- src/V3LinkJump.cpp | 8 +-- src/V3LinkLValue.cpp | 10 +-- src/V3LinkLevel.cpp | 10 +-- src/V3LinkParse.cpp | 9 +-- src/V3LinkResolve.cpp | 10 +-- src/V3Localize.cpp | 7 +-- src/V3MergeCond.cpp | 7 +-- src/V3Name.cpp | 7 +-- src/V3Number.cpp | 6 +- src/V3Options.cpp | 4 +- src/V3Order.cpp | 9 +-- src/V3Param.cpp | 8 +-- src/V3Partition.cpp | 6 +- src/V3PchAstMT.h | 42 +++++++++++++ src/V3PchAstNoMT.h | 46 ++++++++++++++ src/V3Premit.cpp | 9 +-- src/V3ProtectLib.cpp | 6 +- src/V3Randomize.cpp | 6 +- src/V3Reloop.cpp | 9 +-- src/V3Sched.cpp | 6 +- src/V3SchedAcyclic.cpp | 8 +-- src/V3SchedPartition.cpp | 8 +-- src/V3SchedReplicate.cpp | 7 +-- src/V3SchedTiming.cpp | 6 +- src/V3Scope.cpp | 10 +-- src/V3Scoreboard.cpp | 5 +- src/V3Slice.cpp | 8 +-- src/V3Split.cpp | 9 +-- src/V3SplitAs.cpp | 9 +-- src/V3SplitVar.cpp | 9 +-- src/V3Stats.cpp | 6 +- src/V3StatsReport.cpp | 5 +- src/V3Subst.cpp | 7 +-- src/V3TSP.cpp | 8 +-- src/V3Table.cpp | 7 +-- src/V3Task.cpp | 8 +-- src/V3ThreadPool.h | 2 +- src/V3Timing.cpp | 7 +-- src/V3Trace.cpp | 7 +-- src/V3TraceDecl.cpp | 7 +-- src/V3Tristate.cpp | 10 +-- src/V3Undriven.cpp | 9 +-- src/V3Unknown.cpp | 9 +-- src/V3Unroll.cpp | 9 +-- src/V3VariableOrder.cpp | 8 +-- src/V3Width.cpp | 8 +-- src/V3WidthCommit.cpp | 2 +- src/V3WidthSel.cpp | 7 +-- 115 files changed, 294 insertions(+), 736 deletions(-) create mode 100644 src/V3PchAstMT.h create mode 100644 src/V3PchAstNoMT.h diff --git a/Changes b/Changes index cc313c39f..54ec9600e 100644 --- a/Changes +++ b/Changes @@ -19,6 +19,7 @@ Verilator 5.017 devel * Support randc (#4349). * Support resizing function call inout arguments (#4467). * Support converting parameters inside modules to localparams (#4511). [Anthony Donlon] +* Support compilation with precompiled headers with Make and GCC or CLang. * Change lint_off to not propagate upwards to files including where the lint_off is. * Optimize empty expression statements (#4544). * Fix conversion of impure logical expressions to bit expressions (#487 partial) (#4437). [Ryszard Rozak, Antmicro Ltd.] diff --git a/configure.ac b/configure.ac index c508bcfb9..f0c79da98 100644 --- a/configure.ac +++ b/configure.ac @@ -560,6 +560,21 @@ Verilator requires a C++11 or newer compiler.]]) fi AC_SUBST(CFG_CXXFLAGS_STD) +# Compiler precompiled header options (assumes either gcc or clang++) +AC_MSG_CHECKING([for $CXX precompile header include option]) +if $CXX --help | grep include-pch >/dev/null 2>/dev/null ; then + # clang + CFG_CXXFLAGS_PCH_I=-include-pch + CFG_GCH_IF_CLANG=.gch +else + # GCC + CFG_CXXFLAGS_PCH_I=-include + CFG_GCH_IF_CLANG= +fi +AC_MSG_RESULT($CFG_CXXFLAGS_PCH_I) +AC_SUBST(CFG_CXXFLAGS_PCH_I) +AC_SUBST(CFG_GCH_IF_CLANG) + # Checks for library functions. AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec], [AC_DEFINE([HAVE_STAT_NSEC],[1],[Defined if struct stat has st_mtim.tv_nsec])], diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in index 36ae799bb..4efc14c87 100644 --- a/src/Makefile_obj.in +++ b/src/Makefile_obj.in @@ -67,6 +67,11 @@ CFG_CXXFLAGS_PARSER = @CFG_CXXFLAGS_PARSER@ CFG_CXXFLAGS_WEXTRA = @CFG_CXXFLAGS_WEXTRA@ CFG_LDFLAGS_SRC = @CFG_LDFLAGS_SRC@ CFG_LIBS = @CFG_LIBS@ +CFG_CXXFLAGS_PCH = -x c++-header +# Compiler option to put in front of filename to read precompiled header +CFG_CXXFLAGS_PCH_I = @CFG_CXXFLAGS_PCH_I@ +# Compiler's filename prefix for precompiled headers, .gch if clang, empty if GCC +CFG_GCH_IF_CLANG = @CFG_GCH_IF_CLANG@ #### End of system configuration section. #### @@ -129,6 +134,11 @@ BISONPRE = $(srcdir)/bisonpre FLEXFIX = $(srcdir)/flexfix VLCOVGEN = $(srcdir)/vlcovgen +###################################################################### +# CCACHE flags (via environment as no command line option available) +CCACHE_SLOPPINESS ?= pch_defines,time_macros +export CCACHE_SLOPPINESS + ###################################################################### #### Top level @@ -151,16 +161,54 @@ maintainer-copy:: #### Top executable RAW_OBJS = \ + V3Const__gen.o \ + V3Error.o \ + V3FileLine.o \ + V3Graph.o \ + V3GraphAcyc.o \ + V3GraphAlg.o \ + V3GraphPathChecker.o \ + V3GraphTest.o \ + V3Hash.o \ + V3OptionParser.o \ + V3Os.o \ + V3ParseGrammar.o \ + V3ParseImp.o \ + V3ParseLex.o \ + V3PreProc.o \ + V3PreShell.o \ + V3String.o \ + V3ThreadPool.o \ + V3Waiver.o \ Verilator.o \ + +RAW_OBJS_PCH_ASTMT = \ + V3Ast.o \ + V3AstNodes.o \ + V3Broken.o \ + V3Config.o \ + V3EmitCBase.o \ + V3EmitCConstPool.o \ + V3EmitCFunc.o \ + V3EmitCHeaders.o \ + V3EmitCImp.o \ + V3EmitCInlines.o \ + V3EmitV.o \ + V3File.o \ + V3Global.o \ + V3Hasher.o \ + V3Number.o \ + V3Options.o \ + V3Stats.o \ + V3StatsReport.o \ + +RAW_OBJS_PCH_ASTNOMT = \ V3Active.o \ V3ActiveTop.o \ V3Assert.o \ V3AssertPre.o \ - V3Ast.o \ - V3AstNodes.o \ V3Begin.o \ V3Branch.o \ - V3Broken.o \ V3CCtors.o \ V3CUse.o \ V3Case.o \ @@ -170,8 +218,6 @@ RAW_OBJS = \ V3Clock.o \ V3Combine.o \ V3Common.o \ - V3Config.o \ - V3Const__gen.o \ V3Coverage.o \ V3CoverageJoin.o \ V3Dead.o \ @@ -187,34 +233,16 @@ RAW_OBJS = \ V3DfgPasses.o \ V3DfgPeephole.o \ V3DupFinder.o \ - V3EmitCBase.o \ - V3EmitCConstPool.o \ - V3EmitCFunc.o \ - V3EmitCHeaders.o \ - V3EmitCImp.o \ - V3EmitCInlines.o \ V3EmitCMain.o \ V3EmitCMake.o \ V3EmitCModel.o \ V3EmitCSyms.o \ V3EmitMk.o \ - V3EmitV.o \ V3EmitXml.o \ - V3Error.o \ V3Expand.o \ - V3File.o \ - V3FileLine.o \ V3Force.o \ V3Fork.o \ V3Gate.o \ - V3Global.o \ - V3Graph.o \ - V3GraphAcyc.o \ - V3GraphAlg.o \ - V3GraphPathChecker.o \ - V3GraphTest.o \ - V3Hash.o \ - V3Hasher.o \ V3HierBlock.o \ V3Inline.o \ V3Inst.o \ @@ -233,18 +261,9 @@ RAW_OBJS = \ V3Localize.o \ V3MergeCond.o \ V3Name.o \ - V3Number.o \ - V3OptionParser.o \ - V3Options.o \ V3Order.o \ - V3Os.o \ V3Param.o \ - V3ParseGrammar.o \ - V3ParseImp.o \ - V3ParseLex.o \ V3Partition.o \ - V3PreProc.o \ - V3PreShell.o \ V3Premit.o \ V3ProtectLib.o \ V3Randomize.o \ @@ -260,14 +279,10 @@ RAW_OBJS = \ V3Split.o \ V3SplitAs.o \ V3SplitVar.o \ - V3Stats.o \ - V3StatsReport.o \ - V3String.o \ V3Subst.o \ V3TSP.o \ V3Table.o \ V3Task.o \ - V3ThreadPool.o \ V3Timing.o \ V3Trace.o \ V3TraceDecl.o \ @@ -276,7 +291,6 @@ RAW_OBJS = \ V3Unknown.o \ V3Unroll.o \ V3VariableOrder.o \ - V3Waiver.o \ V3Width.o \ V3WidthCommit.o \ V3WidthSel.o \ @@ -286,21 +300,21 @@ VLCOV_OBJS = \ VlcMain.o \ NON_STANDALONE_HEADERS = \ - V3AstInlines.h \ - V3AstNodeDType.h \ - V3AstNodeExpr.h \ - V3AstNodeOther.h \ - V3DfgVertices.h \ + V3AstInlines.h \ + V3AstNodeDType.h \ + V3AstNodeExpr.h \ + V3AstNodeOther.h \ + V3DfgVertices.h \ V3ThreadPool.h \ V3WidthRemove.h \ AST_DEFS := \ - V3AstNodeDType.h \ - V3AstNodeExpr.h \ - V3AstNodeOther.h \ + V3AstNodeDType.h \ + V3AstNodeExpr.h \ + V3AstNodeOther.h \ DFG_DEFS := \ - V3DfgVertices.h + V3DfgVertices.h #### astgen common flags @@ -312,7 +326,7 @@ ASTGENFLAGS += $(foreach f,$(DFG_DEFS),--dfgdef $f) ifeq ($(VL_VLCOV),) PREDEP_H = V3Ast__gen_forward_class_decls.h -OBJS += $(RAW_OBJS) +OBJS += $(RAW_OBJS) $(RAW_OBJS_PCH_ASTMT) $(RAW_OBJS_PCH_ASTNOMT) else PREDEP_H = OBJS += $(VLCOV_OBJS) @@ -332,6 +346,8 @@ V3Number_test: V3Number_test.o .SECONDARY: +%.gch: % + $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} ${CFG_CXXFLAGS_PCH} $< -o $@ %.o: %.cpp $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} -c $< -o $@ %.o: %.c @@ -349,6 +365,22 @@ V3ParseImp.o: V3ParseImp.cpp V3ParseBison.c V3PreProc.o: V3PreProc.cpp V3PreLex.yy.cpp $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSPARSER} -c $< -o $@ +define CXX_ASTMT_template +$(1): $(basename $(1)).cpp V3PchAstMT.h.gch + $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} ${CFG_CXXFLAGS_PCH_I} V3PchAstMT.h${CFG_GCH_IF_CLANG} -c $(srcdir)/$(basename $(1)).cpp -o $(1) + +endef + +$(foreach obj,$(RAW_OBJS_PCH_ASTMT),$(eval $(call CXX_ASTMT_template,$(obj)))) + +define CXX_ASTNOMT_template +$(1): $(basename $(1)).cpp V3PchAstNoMT.h.gch + $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} ${CFG_CXXFLAGS_PCH_I} V3PchAstNoMT.h${CFG_GCH_IF_CLANG} -c $(srcdir)/$(basename $(1)).cpp -o $(1) + +endef + +$(foreach obj,$(RAW_OBJS_PCH_ASTNOMT),$(eval $(call CXX_ASTNOMT_template,$(obj)))) + #### Generated files # Target rule called before parallel build to make generated files diff --git a/src/V3Active.cpp b/src/V3Active.cpp index 857c34045..4930b9293 100644 --- a/src/V3Active.cpp +++ b/src/V3Active.cpp @@ -26,16 +26,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Active.h" -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" #include "V3Graph.h" #include diff --git a/src/V3ActiveTop.cpp b/src/V3ActiveTop.cpp index 4dc193116..4239525b9 100644 --- a/src/V3ActiveTop.cpp +++ b/src/V3ActiveTop.cpp @@ -23,16 +23,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3ActiveTop.h" -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" #include "V3SenTree.h" VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Assert.cpp b/src/V3Assert.cpp index b13fae8c0..3f8278e5b 100644 --- a/src/V3Assert.cpp +++ b/src/V3Assert.cpp @@ -14,16 +14,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Assert.h" -#include "V3Ast.h" -#include "V3Error.h" -#include "V3Global.h" #include "V3Stats.h" VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3AssertPre.cpp b/src/V3AssertPre.cpp index bf416c276..d0689361f 100644 --- a/src/V3AssertPre.cpp +++ b/src/V3AssertPre.cpp @@ -19,16 +19,11 @@ // Transform clocking blocks into imperative logic //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3AssertPre.h" -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" #include "V3Task.h" #include "V3UniqueNames.h" diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index 2c4353ffb..f7441655c 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -14,16 +14,11 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" - -#include "V3Ast.h" +#include "V3PchAstMT.h" #include "V3Broken.h" #include "V3EmitV.h" #include "V3File.h" -#include "V3Global.h" -#include "V3String.h" #include #include diff --git a/src/V3AstNodes.cpp b/src/V3AstNodes.cpp index c48ef68ec..1c2519ad6 100644 --- a/src/V3AstNodes.cpp +++ b/src/V3AstNodes.cpp @@ -14,6 +14,8 @@ // //************************************************************************* +#include "V3PchAstMT.h" + #include "config_build.h" #include "verilatedos.h" diff --git a/src/V3Begin.cpp b/src/V3Begin.cpp index 1ff68713b..b4fa16a24 100644 --- a/src/V3Begin.cpp +++ b/src/V3Begin.cpp @@ -26,18 +26,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Begin.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Branch.cpp b/src/V3Branch.cpp index f24307808..e297f59a9 100644 --- a/src/V3Branch.cpp +++ b/src/V3Branch.cpp @@ -23,18 +23,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Branch.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Broken.cpp b/src/V3Broken.cpp index 54e761246..9ae17efb9 100644 --- a/src/V3Broken.cpp +++ b/src/V3Broken.cpp @@ -22,14 +22,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3Broken.h" -#include "V3Ast.h" -#include "V3Global.h" - // This visitor does not edit nodes, and is called at error-exit, so should use constant iterators #include "V3AstConstOnly.h" diff --git a/src/V3CCtors.cpp b/src/V3CCtors.cpp index 1727126ed..1f8abb5c3 100644 --- a/src/V3CCtors.cpp +++ b/src/V3CCtors.cpp @@ -24,17 +24,12 @@ // This transformation honors outputSplitCFuncs. //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3CCtors.h" #include "V3EmitCBase.h" -#include "V3Global.h" -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3CUse.cpp b/src/V3CUse.cpp index 05215f5bc..748909c2e 100644 --- a/src/V3CUse.cpp +++ b/src/V3CUse.cpp @@ -22,20 +22,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3CUse.h" -#include "V3Ast.h" -#include "V3FileLine.h" -#include "V3Global.h" - -#include -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Case.cpp b/src/V3Case.cpp index 53cc524ce..89458cda8 100644 --- a/src/V3Case.cpp +++ b/src/V3Case.cpp @@ -34,19 +34,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Case.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Stats.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; #define CASE_OVERLAP_WIDTH 16 // Maximum width we can check for overlaps in diff --git a/src/V3Cast.cpp b/src/V3Cast.cpp index 4fb3b868e..0290c944e 100644 --- a/src/V3Cast.cpp +++ b/src/V3Cast.cpp @@ -37,18 +37,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Cast.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Class.cpp b/src/V3Class.cpp index e71de0dab..ef0eddf9b 100644 --- a/src/V3Class.cpp +++ b/src/V3Class.cpp @@ -20,15 +20,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Class.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3UniqueNames.h" VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Clean.cpp b/src/V3Clean.cpp index 9023fadd7..00ddad214 100644 --- a/src/V3Clean.cpp +++ b/src/V3Clean.cpp @@ -23,18 +23,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Clean.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Clock.cpp b/src/V3Clock.cpp index 6a66f45e5..98596e135 100644 --- a/src/V3Clock.cpp +++ b/src/V3Clock.cpp @@ -27,19 +27,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Clock.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Sched.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Combine.cpp b/src/V3Combine.cpp index f6fcd3260..2b858de6c 100644 --- a/src/V3Combine.cpp +++ b/src/V3Combine.cpp @@ -19,17 +19,12 @@ // Also drop empty CFuncs //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Combine.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" #include "V3DupFinder.h" -#include "V3Global.h" #include "V3Stats.h" #include diff --git a/src/V3Common.cpp b/src/V3Common.cpp index d6e08d083..6288ccea9 100644 --- a/src/V3Common.cpp +++ b/src/V3Common.cpp @@ -20,16 +20,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Common.h" -#include "V3Ast.h" #include "V3EmitCBase.h" -#include "V3Global.h" VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Config.cpp b/src/V3Config.cpp index a221f92e8..566021160 100644 --- a/src/V3Config.cpp +++ b/src/V3Config.cpp @@ -14,17 +14,13 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3Config.h" -#include "V3Global.h" #include "V3String.h" -#include #include -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Coverage.cpp b/src/V3Coverage.cpp index 85c9af732..4d04e00cc 100644 --- a/src/V3Coverage.cpp +++ b/src/V3Coverage.cpp @@ -24,17 +24,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Coverage.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3CoverageJoin.cpp b/src/V3CoverageJoin.cpp index 58176cd69..76f0e7bdf 100644 --- a/src/V3CoverageJoin.cpp +++ b/src/V3CoverageJoin.cpp @@ -17,15 +17,11 @@ // If two COVERTOGGLEs have same VARSCOPE, combine them //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3CoverageJoin.h" #include "V3DupFinder.h" -#include "V3Global.h" #include "V3Stats.h" #include diff --git a/src/V3Dead.cpp b/src/V3Dead.cpp index 428538e1c..768887b5f 100644 --- a/src/V3Dead.cpp +++ b/src/V3Dead.cpp @@ -33,17 +33,10 @@ // here after scoping to allow more dead node removal. //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Dead.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Delayed.cpp b/src/V3Delayed.cpp index eba736d48..3a829d22d 100644 --- a/src/V3Delayed.cpp +++ b/src/V3Delayed.cpp @@ -48,20 +48,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Delayed.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Stats.h" -#include #include -#include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Depth.cpp b/src/V3Depth.cpp index 7f1012f50..a459a26c7 100644 --- a/src/V3Depth.cpp +++ b/src/V3Depth.cpp @@ -23,19 +23,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Depth.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3UniqueNames.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3DepthBlock.cpp b/src/V3DepthBlock.cpp index b0e65d136..378f83d0c 100644 --- a/src/V3DepthBlock.cpp +++ b/src/V3DepthBlock.cpp @@ -20,18 +20,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3DepthBlock.h" -#include "V3Ast.h" #include "V3EmitCBase.h" -#include "V3Global.h" - -#include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Descope.cpp b/src/V3Descope.cpp index 8b68ca011..c603204f0 100644 --- a/src/V3Descope.cpp +++ b/src/V3Descope.cpp @@ -22,18 +22,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Descope.h" -#include "V3Ast.h" #include "V3EmitCBase.h" -#include "V3Global.h" - -#include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Dfg.cpp b/src/V3Dfg.cpp index 4e70c94ac..9cda7d02a 100644 --- a/src/V3Dfg.cpp +++ b/src/V3Dfg.cpp @@ -14,10 +14,7 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Dfg.h" diff --git a/src/V3DfgAstToDfg.cpp b/src/V3DfgAstToDfg.cpp index c4aa2d1be..3b23986ff 100644 --- a/src/V3DfgAstToDfg.cpp +++ b/src/V3DfgAstToDfg.cpp @@ -26,16 +26,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT -#include "config_build.h" -#include "verilatedos.h" - -#include "V3Ast.h" #include "V3Dfg.h" #include "V3DfgPasses.h" -#include "V3Error.h" -#include "V3Global.h" VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3DfgDecomposition.cpp b/src/V3DfgDecomposition.cpp index 31bb001ce..200d12610 100644 --- a/src/V3DfgDecomposition.cpp +++ b/src/V3DfgDecomposition.cpp @@ -18,10 +18,7 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Dfg.h" #include "V3File.h" diff --git a/src/V3DfgDfgToAst.cpp b/src/V3DfgDfgToAst.cpp index 43728cef9..a5d0a14a9 100644 --- a/src/V3DfgDfgToAst.cpp +++ b/src/V3DfgDfgToAst.cpp @@ -26,16 +26,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Dfg.h" #include "V3DfgPasses.h" #include "V3UniqueNames.h" -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3DfgOptimizer.cpp b/src/V3DfgOptimizer.cpp index 0a514723b..ea49de41e 100644 --- a/src/V3DfgOptimizer.cpp +++ b/src/V3DfgOptimizer.cpp @@ -18,19 +18,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3DfgOptimizer.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" #include "V3Dfg.h" #include "V3DfgPasses.h" -#include "V3Error.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3UniqueNames.h" diff --git a/src/V3DfgPasses.cpp b/src/V3DfgPasses.cpp index 44026320e..f65b77897 100644 --- a/src/V3DfgPasses.cpp +++ b/src/V3DfgPasses.cpp @@ -14,9 +14,7 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3DfgPasses.h" @@ -24,8 +22,6 @@ #include "V3Global.h" #include "V3String.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; V3DfgCseContext::~V3DfgCseContext() { diff --git a/src/V3DfgPeephole.cpp b/src/V3DfgPeephole.cpp index c3d969a8e..f162c9ec9 100644 --- a/src/V3DfgPeephole.cpp +++ b/src/V3DfgPeephole.cpp @@ -21,18 +21,14 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3DfgPeephole.h" -#include "V3Ast.h" #include "V3Dfg.h" #include "V3DfgPasses.h" #include "V3Stats.h" -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3DupFinder.cpp b/src/V3DupFinder.cpp index f1e3ab956..58a889931 100644 --- a/src/V3DupFinder.cpp +++ b/src/V3DupFinder.cpp @@ -14,20 +14,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3DupFinder.h" -#include "V3Ast.h" #include "V3File.h" -#include "V3Global.h" -#include #include -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3EmitCBase.cpp b/src/V3EmitCBase.cpp index 5a173f38b..c382554c4 100644 --- a/src/V3EmitCBase.cpp +++ b/src/V3EmitCBase.cpp @@ -14,8 +14,7 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3EmitCBase.h" diff --git a/src/V3EmitCConstPool.cpp b/src/V3EmitCConstPool.cpp index 27503551c..656bffcd8 100644 --- a/src/V3EmitCConstPool.cpp +++ b/src/V3EmitCConstPool.cpp @@ -14,15 +14,12 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3EmitC.h" #include "V3EmitCConstInit.h" #include "V3File.h" -#include "V3Global.h" #include "V3Stats.h" -#include "V3String.h" #include #include diff --git a/src/V3EmitCFunc.cpp b/src/V3EmitCFunc.cpp index deb4ceb61..461d6496e 100644 --- a/src/V3EmitCFunc.cpp +++ b/src/V3EmitCFunc.cpp @@ -14,13 +14,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3EmitCFunc.h" -#include "V3Global.h" -#include "V3String.h" #include "V3TSP.h" #include diff --git a/src/V3EmitCHeaders.cpp b/src/V3EmitCHeaders.cpp index 4f63aa5b0..8d9f71c8d 100644 --- a/src/V3EmitCHeaders.cpp +++ b/src/V3EmitCHeaders.cpp @@ -14,13 +14,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" -#include "V3Ast.h" #include "V3EmitC.h" #include "V3EmitCConstInit.h" -#include "V3Global.h" #include #include diff --git a/src/V3EmitCImp.cpp b/src/V3EmitCImp.cpp index f84e9442c..e640634c9 100644 --- a/src/V3EmitCImp.cpp +++ b/src/V3EmitCImp.cpp @@ -14,14 +14,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" -#include "V3Ast.h" #include "V3EmitC.h" #include "V3EmitCFunc.h" -#include "V3Global.h" -#include "V3String.h" #include "V3ThreadPool.h" #include "V3UniqueNames.h" diff --git a/src/V3EmitCInlines.cpp b/src/V3EmitCInlines.cpp index e2603371e..6425a367c 100644 --- a/src/V3EmitCInlines.cpp +++ b/src/V3EmitCInlines.cpp @@ -14,12 +14,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3EmitC.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include "V3Stats.h" #include diff --git a/src/V3EmitCMain.cpp b/src/V3EmitCMain.cpp index 873519d5d..4a9f9c496 100644 --- a/src/V3EmitCMain.cpp +++ b/src/V3EmitCMain.cpp @@ -14,16 +14,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3EmitCMain.h" #include "V3EmitC.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include diff --git a/src/V3EmitCMake.cpp b/src/V3EmitCMake.cpp index bd065144d..ca548d68b 100644 --- a/src/V3EmitCMake.cpp +++ b/src/V3EmitCMake.cpp @@ -14,15 +14,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3EmitCMake.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include "V3HierBlock.h" #include "V3Os.h" diff --git a/src/V3EmitCModel.cpp b/src/V3EmitCModel.cpp index 25a7368c0..53c5339fb 100644 --- a/src/V3EmitCModel.cpp +++ b/src/V3EmitCModel.cpp @@ -14,14 +14,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3EmitC.h" #include "V3EmitCFunc.h" -#include "V3Global.h" #include "V3UniqueNames.h" #include diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index 4a041d784..4642ac016 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -14,14 +14,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3EmitC.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include "V3LanguageWords.h" #include "V3PartitionGraph.h" diff --git a/src/V3EmitMk.cpp b/src/V3EmitMk.cpp index bdf088c6a..e55ff26f5 100644 --- a/src/V3EmitMk.cpp +++ b/src/V3EmitMk.cpp @@ -14,15 +14,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3EmitMk.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include "V3HierBlock.h" #include "V3Os.h" diff --git a/src/V3EmitV.cpp b/src/V3EmitV.cpp index 2f0e40351..38bca92ba 100644 --- a/src/V3EmitV.cpp +++ b/src/V3EmitV.cpp @@ -14,16 +14,12 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3EmitV.h" #include "V3EmitCBase.h" -#include "V3Global.h" -#include -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3EmitXml.cpp b/src/V3EmitXml.cpp index 9065a24b7..d2cb7d621 100644 --- a/src/V3EmitXml.cpp +++ b/src/V3EmitXml.cpp @@ -14,16 +14,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3EmitXml.h" #include "V3EmitCBase.h" -#include "V3Global.h" -#include "V3String.h" #include #include diff --git a/src/V3Expand.cpp b/src/V3Expand.cpp index 2bfe49c5a..af67ad82e 100644 --- a/src/V3Expand.cpp +++ b/src/V3Expand.cpp @@ -25,20 +25,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Expand.h" -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" #include "V3Stats.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3File.cpp b/src/V3File.cpp index 7a669f30d..97a26d572 100644 --- a/src/V3File.cpp +++ b/src/V3File.cpp @@ -14,13 +14,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3File.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Os.h" #include "V3String.h" diff --git a/src/V3Force.cpp b/src/V3Force.cpp index 51437482b..93a3d4a08 100644 --- a/src/V3Force.cpp +++ b/src/V3Force.cpp @@ -37,16 +37,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Force.h" #include "V3AstUserAllocator.h" -#include "V3Error.h" -#include "V3Global.h" VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Fork.cpp b/src/V3Fork.cpp index bce03b9fa..098104d11 100644 --- a/src/V3Fork.cpp +++ b/src/V3Fork.cpp @@ -38,21 +38,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Fork.h" -#include "V3Ast.h" #include "V3AstNodeExpr.h" -#include "V3Error.h" -#include "V3Global.h" #include "V3MemberMap.h" -#include -#include #include #include diff --git a/src/V3Gate.cpp b/src/V3Gate.cpp index a1594e185..0f0bb61cc 100644 --- a/src/V3Gate.cpp +++ b/src/V3Gate.cpp @@ -21,22 +21,16 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Gate.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" #include "V3Const.h" #include "V3DupFinder.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3Stats.h" -#include #include #include #include diff --git a/src/V3Global.cpp b/src/V3Global.cpp index 82dd6e584..f4ebc182a 100644 --- a/src/V3Global.cpp +++ b/src/V3Global.cpp @@ -14,12 +14,8 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" -#include "V3Global.h" - -#include "V3Ast.h" #include "V3File.h" #include "V3HierBlock.h" #include "V3LinkCells.h" diff --git a/src/V3Hasher.cpp b/src/V3Hasher.cpp index 0e13e18d5..e58dce546 100644 --- a/src/V3Hasher.cpp +++ b/src/V3Hasher.cpp @@ -14,8 +14,7 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3Hasher.h" diff --git a/src/V3HierBlock.cpp b/src/V3HierBlock.cpp index 331c8cbc9..f1624493b 100644 --- a/src/V3HierBlock.cpp +++ b/src/V3HierBlock.cpp @@ -72,12 +72,10 @@ // Used for b) and c). // This options is repeated for all instantiating hierarchical blocks. -#define VL_MT_DISABLED_CODE_UNIT 1 +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3HierBlock.h" -#include "V3Ast.h" -#include "V3Error.h" #include "V3File.h" #include "V3Os.h" #include "V3Stats.h" diff --git a/src/V3Inline.cpp b/src/V3Inline.cpp index 4735bc079..dbc3e7bb9 100644 --- a/src/V3Inline.cpp +++ b/src/V3Inline.cpp @@ -24,21 +24,14 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Inline.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" -#include "V3Global.h" #include "V3Inst.h" #include "V3Stats.h" -#include "V3String.h" -#include #include #include diff --git a/src/V3Inst.cpp b/src/V3Inst.cpp index dd3e7e283..fa5b2da3c 100644 --- a/src/V3Inst.cpp +++ b/src/V3Inst.cpp @@ -21,18 +21,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Inst.h" -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" - -#include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3InstrCount.cpp b/src/V3InstrCount.cpp index 7e363ba17..95bbdaa06 100644 --- a/src/V3InstrCount.cpp +++ b/src/V3InstrCount.cpp @@ -15,15 +15,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3InstrCount.h" -#include "V3Ast.h" - #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Interface.cpp b/src/V3Interface.cpp index a0b641885..de504d25c 100644 --- a/src/V3Interface.cpp +++ b/src/V3Interface.cpp @@ -23,16 +23,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Interface.h" -#include "V3Ast.h" -#include "V3Global.h" - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Life.cpp b/src/V3Life.cpp index 5fd69a27f..84ee05d60 100644 --- a/src/V3Life.cpp +++ b/src/V3Life.cpp @@ -23,19 +23,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Life.h" -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" #include "V3Stats.h" -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3LifePost.cpp b/src/V3LifePost.cpp index 35728e5de..6692a3ebf 100644 --- a/src/V3LifePost.cpp +++ b/src/V3LifePost.cpp @@ -24,15 +24,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LifePost.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3GraphPathChecker.h" #include "V3PartitionGraph.h" #include "V3Stats.h" diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index 4d18030eb..14bcfee31 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -23,21 +23,14 @@ // Link to module that instantiates it //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LinkCells.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3Parse.h" #include "V3SymTable.h" -#include -#include #include #include diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 3b129d741..473545166 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -61,22 +61,15 @@ // b (VSymEnt->AstCell) //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LinkDot.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3MemberMap.h" #include "V3String.h" #include "V3SymTable.h" -#include -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3LinkInc.cpp b/src/V3LinkInc.cpp index 4e2381ff7..d4a00861c 100644 --- a/src/V3LinkInc.cpp +++ b/src/V3LinkInc.cpp @@ -36,16 +36,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LinkInc.h" -#include "V3Ast.h" -#include "V3Global.h" - #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3LinkJump.cpp b/src/V3LinkJump.cpp index d0aa33e64..e777ac164 100644 --- a/src/V3LinkJump.cpp +++ b/src/V3LinkJump.cpp @@ -29,18 +29,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LinkJump.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" -#include "V3Global.h" -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3LinkLValue.cpp b/src/V3LinkLValue.cpp index 9431731a3..11a1e4499 100644 --- a/src/V3LinkLValue.cpp +++ b/src/V3LinkLValue.cpp @@ -18,18 +18,10 @@ // Set lvalue() attributes on appropriate VARREFs. //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LinkLValue.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3LinkLevel.cpp b/src/V3LinkLevel.cpp index dbb0631da..9c0500239 100644 --- a/src/V3LinkLevel.cpp +++ b/src/V3LinkLevel.cpp @@ -19,18 +19,10 @@ // Create new MODULE TOP with connections to below signals //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LinkLevel.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3LinkParse.cpp b/src/V3LinkParse.cpp index 5b863df9c..b3371c2a3 100644 --- a/src/V3LinkParse.cpp +++ b/src/V3LinkParse.cpp @@ -18,19 +18,12 @@ // Move some attributes around //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LinkParse.h" -#include "V3Ast.h" #include "V3Config.h" -#include "V3Global.h" -#include -#include #include #include diff --git a/src/V3LinkResolve.cpp b/src/V3LinkResolve.cpp index e3767407c..b0636a298 100644 --- a/src/V3LinkResolve.cpp +++ b/src/V3LinkResolve.cpp @@ -24,21 +24,13 @@ // SenItems: Convert pos/negedge of non-simple signals to temporaries //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3LinkResolve.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3String.h" #include "V3Task.h" -#include -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Localize.cpp b/src/V3Localize.cpp index 16500e84d..d26a86175 100644 --- a/src/V3Localize.cpp +++ b/src/V3Localize.cpp @@ -22,16 +22,11 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Localize.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" -#include "V3Global.h" #include "V3Stats.h" #include diff --git a/src/V3MergeCond.cpp b/src/V3MergeCond.cpp index 5598a5cdf..b9e08ea22 100644 --- a/src/V3MergeCond.cpp +++ b/src/V3MergeCond.cpp @@ -72,17 +72,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3MergeCond.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" #include "V3DupFinder.h" -#include "V3Global.h" #include "V3Hasher.h" #include "V3Stats.h" diff --git a/src/V3Name.cpp b/src/V3Name.cpp index 56896ef58..9825a3bac 100644 --- a/src/V3Name.cpp +++ b/src/V3Name.cpp @@ -19,15 +19,10 @@ // Prepend __PVT__ to variable names //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Name.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3LanguageWords.h" VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Number.cpp b/src/V3Number.cpp index b6d2a519c..acc6e6639 100644 --- a/src/V3Number.cpp +++ b/src/V3Number.cpp @@ -14,14 +14,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3Number.h" -#include "V3Ast.h" -#include "V3Global.h" - #include #include #include diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 9b816f63d..554af3421 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -14,12 +14,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3Options.h" -#include "V3Ast.h" #include "V3Error.h" #include "V3File.h" #include "V3Global.h" diff --git a/src/V3Order.cpp b/src/V3Order.cpp index c3ba10a93..b3af14abc 100644 --- a/src/V3Order.cpp +++ b/src/V3Order.cpp @@ -71,19 +71,14 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Order.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" #include "V3Const.h" #include "V3EmitV.h" #include "V3File.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3GraphStream.h" #include "V3List.h" @@ -96,10 +91,8 @@ #include "V3SplitVar.h" #include "V3Stats.h" -#include #include #include -#include #include #include #include diff --git a/src/V3Param.cpp b/src/V3Param.cpp index 2479c7f0d..4133df59f 100644 --- a/src/V3Param.cpp +++ b/src/V3Param.cpp @@ -44,17 +44,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Param.h" -#include "V3Ast.h" #include "V3Case.h" #include "V3Const.h" -#include "V3Global.h" #include "V3Hasher.h" #include "V3Os.h" #include "V3Parse.h" @@ -63,7 +58,6 @@ #include #include -#include #include #include diff --git a/src/V3Partition.cpp b/src/V3Partition.cpp index d2e27a85b..16e7d612c 100644 --- a/src/V3Partition.cpp +++ b/src/V3Partition.cpp @@ -14,10 +14,7 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Partition.h" @@ -34,7 +31,6 @@ #include "V3Stats.h" #include "V3UniqueNames.h" -#include #include #include #include diff --git a/src/V3PchAstMT.h b/src/V3PchAstMT.h new file mode 100644 index 000000000..50590fd6a --- /dev/null +++ b/src/V3PchAstMT.h @@ -0,0 +1,42 @@ +// -*- mode: C++; c-file-style: "cc-mode" -*- +//************************************************************************* +// Code available from: https://verilator.org +// +// Copyright 2003-2023 by Wilson Snyder. This program is free software; you +// can redistribute it and/or modify it under the terms of either the GNU +// Lesser General Public License Version 3 or the Perl Artistic License +// Version 2.0. +// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 +// +//************************************************************************* +// DESCRIPTION: Verilator: Precompilable header of V3Ast, multithreaded +// +//************************************************************************* + +#ifndef VERILATOR_V3PCHASTMT_H_ +#define VERILATOR_V3PCHASTMT_H_ + +#ifdef VL_PCH_INCLUDED +#error "Including multiple V3Pch*.h flavors" +#endif +#define VL_PCH_INCLUDED + +#include "config_build.h" +#include "verilatedos.h" + +#include + +#include "V3Ast.h" +#include "V3Broken.h" +#include "V3Error.h" +#include "V3FileLine.h" +#include "V3FunctionTraits.h" +#include "V3Global.h" +#include "V3Mutex.h" +#include "V3Number.h" +#include "V3Options.h" +#include "V3StdFuture.h" +#include "V3String.h" +#include "V3ThreadSafety.h" + +#endif // Guard diff --git a/src/V3PchAstNoMT.h b/src/V3PchAstNoMT.h new file mode 100644 index 000000000..0ac7907a8 --- /dev/null +++ b/src/V3PchAstNoMT.h @@ -0,0 +1,46 @@ +// -*- mode: C++; c-file-style: "cc-mode" -*- +//************************************************************************* +// Code available from: https://verilator.org +// +// Copyright 2003-2023 by Wilson Snyder. This program is free software; you +// can redistribute it and/or modify it under the terms of either the GNU +// Lesser General Public License Version 3 or the Perl Artistic License +// Version 2.0. +// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 +// +//************************************************************************* +// DESCRIPTION: Verilator: Precompilable header of V3Ast, non-multithreaded +// +//************************************************************************* + +#ifndef VERILATOR_V3PCHASTNOMT_H_ +#define VERILATOR_V3PCHASTNOMT_H_ + +#ifdef VL_PCH_INCLUDED +#error "Including multiple V3Pch*.h flavors" +#endif +#define VL_PCH_INCLUDED + +#define VL_MT_DISABLED_CODE_UNIT 1 + +#include "config_build.h" +#include "verilatedos.h" + +#include +#include +#include + +#include "V3Ast.h" +#include "V3Broken.h" +#include "V3Error.h" +#include "V3FileLine.h" +#include "V3FunctionTraits.h" +#include "V3Global.h" +#include "V3Mutex.h" +#include "V3Number.h" +#include "V3Options.h" +#include "V3StdFuture.h" +#include "V3String.h" +#include "V3ThreadSafety.h" + +#endif // Guard diff --git a/src/V3Premit.cpp b/src/V3Premit.cpp index 57a5c3826..c6ebaacee 100644 --- a/src/V3Premit.cpp +++ b/src/V3Premit.cpp @@ -24,20 +24,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Premit.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Stats.h" #include "V3UniqueNames.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; constexpr int STATIC_CONST_MIN_WIDTH = 256; // Minimum size to extract to static constant diff --git a/src/V3ProtectLib.cpp b/src/V3ProtectLib.cpp index 08a415395..0fa0c4c2a 100644 --- a/src/V3ProtectLib.cpp +++ b/src/V3ProtectLib.cpp @@ -14,14 +14,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3ProtectLib.h" -#include "V3Global.h" #include "V3Hasher.h" #include "V3String.h" #include "V3Task.h" diff --git a/src/V3Randomize.cpp b/src/V3Randomize.cpp index b544690d1..5c39b78d2 100644 --- a/src/V3Randomize.cpp +++ b/src/V3Randomize.cpp @@ -24,14 +24,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Randomize.h" -#include "V3Ast.h" #include "V3MemberMap.h" VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Reloop.cpp b/src/V3Reloop.cpp index b50f21b67..55f07fe35 100644 --- a/src/V3Reloop.cpp +++ b/src/V3Reloop.cpp @@ -29,19 +29,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Reloop.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Stats.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Sched.cpp b/src/V3Sched.cpp index b3849955d..a7012d151 100644 --- a/src/V3Sched.cpp +++ b/src/V3Sched.cpp @@ -35,14 +35,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Sched.h" -#include "V3Ast.h" #include "V3EmitCBase.h" #include "V3EmitV.h" #include "V3Order.h" diff --git a/src/V3SchedAcyclic.cpp b/src/V3SchedAcyclic.cpp index d6d9d73ce..f70022350 100644 --- a/src/V3SchedAcyclic.cpp +++ b/src/V3SchedAcyclic.cpp @@ -33,14 +33,8 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT -#include "config_build.h" -#include "verilatedos.h" - -#include "V3Ast.h" -#include "V3Error.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3Sched.h" #include "V3SenTree.h" diff --git a/src/V3SchedPartition.cpp b/src/V3SchedPartition.cpp index c7c3fb29b..a5cbfd3c9 100644 --- a/src/V3SchedPartition.cpp +++ b/src/V3SchedPartition.cpp @@ -34,15 +34,9 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT -#include "config_build.h" -#include "verilatedos.h" - -#include "V3Ast.h" #include "V3EmitV.h" -#include "V3Error.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3Sched.h" diff --git a/src/V3SchedReplicate.cpp b/src/V3SchedReplicate.cpp index 037fd3593..9ef1fcdb0 100644 --- a/src/V3SchedReplicate.cpp +++ b/src/V3SchedReplicate.cpp @@ -34,13 +34,8 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT -#include "config_build.h" -#include "verilatedos.h" - -#include "V3Ast.h" -#include "V3Error.h" #include "V3Graph.h" #include "V3Sched.h" diff --git a/src/V3SchedTiming.cpp b/src/V3SchedTiming.cpp index e072814e7..56a89ed24 100644 --- a/src/V3SchedTiming.cpp +++ b/src/V3SchedTiming.cpp @@ -24,13 +24,9 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3EmitCBase.h" -#include "V3Error.h" #include "V3Sched.h" #include diff --git a/src/V3Scope.cpp b/src/V3Scope.cpp index c60a8c935..4f6efb93e 100644 --- a/src/V3Scope.cpp +++ b/src/V3Scope.cpp @@ -21,18 +21,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Scope.h" -#include "V3Ast.h" -#include "V3Global.h" - -#include -#include #include #include diff --git a/src/V3Scoreboard.cpp b/src/V3Scoreboard.cpp index 5d25cdf76..1a26dbc2f 100644 --- a/src/V3Scoreboard.cpp +++ b/src/V3Scoreboard.cpp @@ -14,10 +14,7 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Scoreboard.h" diff --git a/src/V3Slice.cpp b/src/V3Slice.cpp index 3df645406..0076094e0 100644 --- a/src/V3Slice.cpp +++ b/src/V3Slice.cpp @@ -35,16 +35,10 @@ // simplified to look primarily for SLICESELs. //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Slice.h" -#include "V3Ast.h" -#include "V3Global.h" - VL_DEFINE_DEBUG_FUNCTIONS; //************************************************************************* diff --git a/src/V3Split.cpp b/src/V3Split.cpp index aa0ac31f0..c543aec1d 100644 --- a/src/V3Split.cpp +++ b/src/V3Split.cpp @@ -77,20 +77,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Split.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3Stats.h" -#include -#include #include #include #include diff --git a/src/V3SplitAs.cpp b/src/V3SplitAs.cpp index 80be47d77..26898c676 100644 --- a/src/V3SplitAs.cpp +++ b/src/V3SplitAs.cpp @@ -21,19 +21,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3SplitAs.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Stats.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3SplitVar.cpp b/src/V3SplitVar.cpp index e940918b8..8711f4bc6 100644 --- a/src/V3SplitVar.cpp +++ b/src/V3SplitVar.cpp @@ -110,20 +110,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3SplitVar.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Stats.h" #include "V3UniqueNames.h" -#include // sort -#include #include #include diff --git a/src/V3Stats.cpp b/src/V3Stats.cpp index f79da45e4..3f89004df 100644 --- a/src/V3Stats.cpp +++ b/src/V3Stats.cpp @@ -14,14 +14,10 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" #include "V3Stats.h" -#include "V3Ast.h" -#include "V3Global.h" - // This visitor does not edit nodes, and is called at error-exit, so should use constant iterators #include "V3AstConstOnly.h" diff --git a/src/V3StatsReport.cpp b/src/V3StatsReport.cpp index c725a40f5..a41f116d6 100644 --- a/src/V3StatsReport.cpp +++ b/src/V3StatsReport.cpp @@ -14,17 +14,14 @@ // //************************************************************************* -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstMT.h" -#include "V3Ast.h" #include "V3File.h" #include "V3Global.h" #include "V3Os.h" #include "V3Stats.h" #include -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Subst.cpp b/src/V3Subst.cpp index b214a860f..7c2465dad 100644 --- a/src/V3Subst.cpp +++ b/src/V3Subst.cpp @@ -22,15 +22,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Subst.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Stats.h" #include diff --git a/src/V3TSP.cpp b/src/V3TSP.cpp index cdc296c45..583db4ab4 100644 --- a/src/V3TSP.cpp +++ b/src/V3TSP.cpp @@ -19,19 +19,13 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3TSP.h" -#include "V3Error.h" #include "V3File.h" -#include "V3Global.h" #include "V3Graph.h" -#include #include #include #include diff --git a/src/V3Table.cpp b/src/V3Table.cpp index ec9bb4167..cfdc10717 100644 --- a/src/V3Table.cpp +++ b/src/V3Table.cpp @@ -21,15 +21,10 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Table.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Simulate.h" #include "V3Stats.h" diff --git a/src/V3Task.cpp b/src/V3Task.cpp index 993ee99a5..a410f06a6 100644 --- a/src/V3Task.cpp +++ b/src/V3Task.cpp @@ -23,21 +23,15 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Task.h" -#include "V3Ast.h" #include "V3Const.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3LinkLValue.h" -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3ThreadPool.h b/src/V3ThreadPool.h index f2564710e..ccfa2f88c 100644 --- a/src/V3ThreadPool.h +++ b/src/V3ThreadPool.h @@ -17,7 +17,7 @@ #ifndef _V3THREADPOOL_H_ #define _V3THREADPOOL_H_ 1 -#if defined(VL_MT_DISABLED_CODE_UNIT) +#ifdef VL_MT_DISABLED_CODE_UNIT #error "Source file has been declared as MT_DISABLED, threads use is prohibited." #endif diff --git a/src/V3Timing.cpp b/src/V3Timing.cpp index 132d3d6bf..65948a526 100644 --- a/src/V3Timing.cpp +++ b/src/V3Timing.cpp @@ -60,17 +60,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Timing.h" -#include "V3Ast.h" #include "V3Const.h" #include "V3EmitV.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3MemberMap.h" #include "V3SenExprBuilder.h" diff --git a/src/V3Trace.cpp b/src/V3Trace.cpp index c698e1f99..653ba6548 100644 --- a/src/V3Trace.cpp +++ b/src/V3Trace.cpp @@ -35,21 +35,16 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Trace.h" #include "V3DupFinder.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3Stats.h" #include -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3TraceDecl.cpp b/src/V3TraceDecl.cpp index d7c69efc7..284936660 100644 --- a/src/V3TraceDecl.cpp +++ b/src/V3TraceDecl.cpp @@ -20,10 +20,7 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3TraceDecl.h" @@ -31,10 +28,8 @@ #include "V3Config.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include "V3Stats.h" -#include #include #include #include diff --git a/src/V3Tristate.cpp b/src/V3Tristate.cpp index 00e92e6e9..a584d1748 100644 --- a/src/V3Tristate.cpp +++ b/src/V3Tristate.cpp @@ -115,22 +115,14 @@ // unsupported. //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Tristate.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Graph.h" #include "V3Inst.h" #include "V3Stats.h" -#include -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Undriven.cpp b/src/V3Undriven.cpp index ece583f21..09d6e5043 100644 --- a/src/V3Undriven.cpp +++ b/src/V3Undriven.cpp @@ -23,19 +23,12 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Undriven.h" -#include "V3Ast.h" -#include "V3Global.h" #include "V3Stats.h" -#include "V3String.h" -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Unknown.cpp b/src/V3Unknown.cpp index 4ad6c78b9..625055393 100644 --- a/src/V3Unknown.cpp +++ b/src/V3Unknown.cpp @@ -28,21 +28,14 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Unknown.h" -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" #include "V3Stats.h" #include "V3UniqueNames.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3Unroll.cpp b/src/V3Unroll.cpp index 59a6efa7b..f2a7af31b 100644 --- a/src/V3Unroll.cpp +++ b/src/V3Unroll.cpp @@ -24,21 +24,14 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Unroll.h" -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" #include "V3Simulate.h" #include "V3Stats.h" -#include - VL_DEFINE_DEBUG_FUNCTIONS; //###################################################################### diff --git a/src/V3VariableOrder.cpp b/src/V3VariableOrder.cpp index 707a8d391..2fbea7c75 100644 --- a/src/V3VariableOrder.cpp +++ b/src/V3VariableOrder.cpp @@ -20,20 +20,14 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3VariableOrder.h" -#include "V3Ast.h" #include "V3AstUserAllocator.h" #include "V3EmitCBase.h" -#include "V3Global.h" #include "V3TSP.h" -#include #include VL_DEFINE_DEBUG_FUNCTIONS; diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 20d5d4954..f5f9c85e8 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -63,15 +63,11 @@ // iterateSubtreeReturnEdits. //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 - -#include "config_build.h" -#include "verilatedos.h" +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "V3Width.h" #include "V3Const.h" -#include "V3Global.h" #include "V3MemberMap.h" #include "V3Number.h" #include "V3Randomize.h" @@ -79,8 +75,6 @@ #include "V3Task.h" #include "V3WidthCommit.h" -#include - // More code; this file was getting too large; see actions there #define VERILATOR_V3WIDTH_CPP_ #include "V3WidthRemove.h" diff --git a/src/V3WidthCommit.cpp b/src/V3WidthCommit.cpp index 295d3be8d..abfb20bab 100644 --- a/src/V3WidthCommit.cpp +++ b/src/V3WidthCommit.cpp @@ -20,7 +20,7 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT #include "config_build.h" #include "verilatedos.h" diff --git a/src/V3WidthSel.cpp b/src/V3WidthSel.cpp index c15d64add..8c8aa4bb4 100644 --- a/src/V3WidthSel.cpp +++ b/src/V3WidthSel.cpp @@ -26,14 +26,9 @@ // //************************************************************************* -#define VL_MT_DISABLED_CODE_UNIT 1 +#include "V3PchAstNoMT.h" // VL_MT_DISABLED_CODE_UNIT -#include "config_build.h" -#include "verilatedos.h" - -#include "V3Ast.h" #include "V3Const.h" -#include "V3Global.h" #include "V3Width.h" VL_DEFINE_DEBUG_FUNCTIONS;