llvm / llvm/circt

[ExportVerilog] Consider to cache results of `isExpressionUnableToInline`

Open
#2,489 2 comments 0 reactions 0 assignees View on GitHub
ExportVerilog
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

`isExpressionUnableToInline(op)` checks all users to determine the given operation is allowed to emit inline.
I haven't done proper profiling but it might be possible to speed up ExportVerilog by cacheing the result of `isExpressionUnableToInline`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate isExpressionUnableToInline(op) in the ExportVerilog implementation and inspect how it traverses users. Profile ExportVerilog before changing behavior, then evaluate whether caching the result is correct and beneficial. Done means inlineability decisions remain unchanged and the measured export performance improves.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.