Split up assignments to wides with Concat on the RHS (#5599)

Add a new pass to split up (recursively):

foo = {l, r};

into the following, with the right indices, iff the concatenation
straddles a wide word boundary.

foo[_:_] = r;
foo[_:_] = l;

This eliminates more wide temporaries.

Another 23% speedup on VeeR EH2 high_perf. Also brings the predicted
stack size from 8M to 40k.
This commit is contained in:
Geza Lore
2024-11-10 15:51:59 +00:00
committed by GitHub
parent 7f1aae640f
commit 77ef2cd487
10 changed files with 261 additions and 0 deletions
+4
View File
@@ -53,6 +53,7 @@
#include "V3File.h"
#include "V3Force.h"
#include "V3Fork.h"
#include "V3FuncOpt.h"
#include "V3Gate.h"
#include "V3Global.h"
#include "V3Graph.h"
@@ -497,6 +498,9 @@ static void process() {
// --GENERATION------------------
if (!v3Global.opt.serializeOnly()) {
// Generic optimizations on a per-function basis
if (v3Global.opt.fFunc()) V3FuncOpt::funcOptAll(v3Global.rootp());
// Remove unused vars
V3Const::constifyAll(v3Global.rootp());
V3Dead::deadifyAll(v3Global.rootp());