chipsalliance / chipsalliance/Surelog

Whether to reduce or not, elaborated vs. non-elaborated

Open
#3,759 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
475
Forks
90
Avg merge
1h 39m
Merged PRs (30d)
37

Description

Usually, the check for whether or not to reduce an expression is dependent on the `reduce` argument to the CompileHelper members. However, the flag doesn't always account for whether the functions are being called in elaborated mode or non-elaborated mode context. There are cases where the functions explicitly force a reduction by passing `true` downstream disregarding the input `reduce` flag. I have tried to fix this issue in currently open/blocked PR #3651, but ran into other unexpected differences.

Question: Is wrapping the reduction call sites with both both `m_elabMode` and `reduce` the right solution to disable reduction in non-elaborated mode? If not, what more need to happen?

P.S. I pointed out this issue in the recently merged PR #3758 as well but since it didn't catch your eye, reporting it as an actual issue since this needs to be accounted for in lot more other places than just this specific change.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the CompileHelper members and the reduction call sites discussed in PR #3651, then compare them with the elaborated and non-elaborated behavior noted in PR #3758. Determine the intended interaction between m_elabMode and reduce, and define what consistent reduction behavior should look like before changing the affected locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.