Skip to content

Commit

Permalink
Implement BinaryOpSimplifier
Browse files Browse the repository at this point in the history
This commit implements a struct to replace template
instantions of the functions tryAndSimplifyBinaryOp*.

This change limits the number of template instantiations
potential call sites have to create as well as abstracts
some captured variables inside the struct to minimize
the number of arguments passed to actual calls.

In essence, a closure is emulated by the struct.
Through escape analysis, scalar replacement and inlining,
the overhead of creating this struct should be minimal
on -O3

Signed-off-by: James You <[email protected]>
  • Loading branch information
jmesyou committed Dec 21, 2023
1 parent 8e6c793 commit 092686b
Showing 1 changed file with 200 additions and 84 deletions.
Loading

0 comments on commit 092686b

Please sign in to comment.