Optimize inlining small C functions and add -inline-cfuncs (#6815)

This commit is contained in:
Jose Drowne
2025-12-21 13:14:50 -05:00
committed by GitHub
parent e6877e83fd
commit c0a0f0dab9
22 changed files with 509 additions and 7 deletions
+6
View File
@@ -63,6 +63,7 @@
#include "V3Graph.h"
#include "V3HierBlock.h"
#include "V3Inline.h"
#include "V3InlineCFuncs.h"
#include "V3Inst.h"
#include "V3Interface.h"
#include "V3LibMap.h"
@@ -565,6 +566,11 @@ static void process() {
V3Reloop::reloopAll(v3Global.rootp());
}
if (v3Global.opt.inlineCFuncs()) {
// Inline small CFuncs to reduce function call overhead
V3InlineCFuncs::inlineAll(v3Global.rootp());
}
// Fix very deep expressions
// Mark evaluation functions as member functions, if needed.
V3Depth::depthAll(v3Global.rootp());