Conversation
…th ENABLE_READLINE (cherry picked from commit 5054fd1)
Release version 0.62
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 241852e in 19 seconds. Click for details.
- Reviewed
236lines of code in4files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_jY2hx7sHLirMGXe7
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Greptile OverviewGreptile SummaryThis PR merges upstream changes from version 0.61 to 0.62, including version bumps and refactoring of ABC process management in Key Changes:
Critical Issues:
The refactoring changes the conditional compilation structure and control flow significantly, which increases complexity without clear documentation of the changes. Confidence Score: 1/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Module as RTLIL::Module
participant RunAbcState as RunAbcState::run()
participant ProcessPool as ConcurrentStack<AbcProcess>
participant ABC as ABC Executable
participant Filter as abc_output_filter
Module->>RunAbcState: prepare_module()
RunAbcState->>RunAbcState: Write input.blif
RunAbcState->>RunAbcState: Generate abc.script
alt count_output == 0
RunAbcState->>Module: Early return (nothing to map)
else count_output > 0
RunAbcState->>Filter: Create output filter
alt YOSYS_LINK_ABC defined
RunAbcState->>ABC: Call abc::Abc_RealMain()
ABC->>Filter: Process output
Filter->>RunAbcState: Filtered logs
else REUSE_YOSYS_ABC_PROCESSES && is_yosys_abc()
RunAbcState->>ProcessPool: try_pop_back()
alt Process available
ProcessPool->>RunAbcState: Reuse existing process
else No process available
RunAbcState->>ABC: spawn_abc()
ABC->>RunAbcState: New process
end
RunAbcState->>ABC: Write commands to pipe
ABC->>Filter: Read until "YOSYS_ABC_DONE"
Filter->>RunAbcState: Filtered logs
alt Success (ret == 0)
RunAbcState->>ProcessPool: Return process to pool
end
else External ABC or fallback
RunAbcState->>ABC: run_command()
ABC->>Filter: Output via stdout/stderr
Filter->>RunAbcState: Filtered logs
end
alt ret != 0
RunAbcState->>Module: log_error (script failed)
else ret == 0
Note over RunAbcState: BUG: Line 1423 unreachable<br/>did_run never set to true
end
end
|
| logs.log_error("ABC: execution of script \"%s\" failed: return code %d (errno=%d).\n", tmp_script_name, ret, errno); | ||
| return; | ||
| } | ||
| logs.log("Don't call ABC as there is nothing to map.\n"); |
There was a problem hiding this comment.
This log message is unreachable - it's after a return statement on line 1421 and will never execute. Originally this message appeared when count_output == 0, but the refactoring moved the early return to line 1336-1338.
| logs.log("Don't call ABC as there is nothing to map.\n"); | |
| did_run = true; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: passes/techmap/abc.cc
Line: 1423:1423
Comment:
This log message is unreachable - it's after a return statement on line 1421 and will never execute. Originally this message appeared when `count_output == 0`, but the refactoring moved the early return to line 1336-1338.
```suggestion
did_run = true;
```
How can I resolve this? If you propose a fix, please make it concise.| } | ||
| did_run = true; | ||
| #endif | ||
| std::string cmd = stringf("\"%s\" -s -f %s 2>&1", config.exe_file, tmp_script_name); |
There was a problem hiding this comment.
Missing .c_str() on config.exe_file - the original code used config.exe_file.c_str() but this was changed to just config.exe_file. While this may work due to implicit conversion, it's inconsistent with the original code and could cause issues.
| std::string cmd = stringf("\"%s\" -s -f %s 2>&1", config.exe_file, tmp_script_name); | |
| std::string cmd = stringf("\"%s\" -s -f %s 2>&1", config.exe_file.c_str(), tmp_script_name.c_str()); |
Prompt To Fix With AI
This is a comment left during a code review.
Path: passes/techmap/abc.cc
Line: 1415:1415
Comment:
Missing `.c_str()` on `config.exe_file` - the original code used `config.exe_file.c_str()` but this was changed to just `config.exe_file`. While this may work due to implicit conversion, it's inconsistent with the original code and could cause issues.
```suggestion
std::string cmd = stringf("\"%s\" -s -f %s 2>&1", config.exe_file.c_str(), tmp_script_name.c_str());
```
How can I resolve this? If you propose a fix, please make it concise.
If your work is part of a larger effort, please discuss your general plans on Discourse first to align your vision with maintainers.
What are the reasons/motivation for this change?
Explain how this is achieved.
Make sure your change comes with tests. If not possible, share how a reviewer might evaluate it.
These template prompts can be deleted when you're done responding to them.
Important
Update Yosys to version 0.62 and add process reuse feature in
abc.ccfor improved performance.0.62inMakefileandconf.py.CHANGELOGfor version0.61 .. 0.62with new features and commands.REUSE_YOSYS_ABC_PROCESSESmacro inabc.ccto enable process reuse whenYOSYS_ENABLE_READLINEis defined.RunAbcState::run()to reuse processes fromprocess_poolifis_yosys_abc()returns true.spawn_abc()function to handle process creation with pipes for communication.bumpversiontarget inMakefileto use new commit hash.abc.cc.This description was created by
for 241852e. You can customize this summary. It will automatically update as commits are pushed.