From f915d621c84f290c28366f178cee4c5ac61c4297 Mon Sep 17 00:00:00 2001 From: Hideto Ueno Date: Tue, 4 Apr 2023 23:37:20 +0900 Subject: [PATCH] [firtool] Move 1st DropName to after CSE. Delete 2nd DropName pass. (#4928) This reduces entire execution time by 2~3%. --- tools/firtool/firtool.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tools/firtool/firtool.cpp b/tools/firtool/firtool.cpp index f7b9c62ba08b..614341e30dd9 100644 --- a/tools/firtool/firtool.cpp +++ b/tools/firtool/firtool.cpp @@ -525,14 +525,13 @@ static LogicalResult processBuffer( pm.nest().addPass(firrtl::createLowerIntrinsicsPass()); - // TODO: Move this to the O1 pipeline. - pm.nest().nest().addPass( - firrtl::createDropNamesPass(preserveMode)); - if (!disableOptimization) pm.nest().nest().addPass( createCSEPass()); + pm.nest().nest().addPass( + firrtl::createDropNamesPass(preserveMode)); + pm.nest().addPass(firrtl::createInjectDUTHierarchyPass()); pm.nest().nest().addPass( @@ -639,9 +638,6 @@ static LogicalResult processBuffer( pm.nest().addPass( firrtl::createBlackBoxReaderPass(blackBoxRoot)); - pm.nest().nest().addPass( - firrtl::createDropNamesPass(preserveMode)); - // Run SymbolDCE as late as possible, but before InnerSymbolDCE. This is for // hierpathop's and just for general cleanup. pm.addNestedPass(mlir::createSymbolDCEPass());