llvm / llvm/circt

[SCFToCalyx] Evaluate usefulness of `scf.execute_region` lowering

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

Description

https://github.com/llvm/circt/pull/1846 introduced lowering of `scf.execute_region` ops to Calyx. However, doubts remain as to whether this is an integral part of the lowering pass, or if it will end up as dead code. As such, we need to evaluate whether there are potential users for the lowering.

Polygeist might be a potential user for `scf.execute_region` lowering. An example is when building affine loops: https://github.com/wsmoses/Polygeist/blob/main/mlir-clang/Lib/clang-mlir.cc#L794.

If we find that `scf.execute_region` are common in lowered C code, then support for lowering it should be kept. If not, it should be removed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing https://github.com/llvm/circt/pull/1846 and the Polygeist example in mlir-clang/Lib/clang-mlir.cc around line 794. Check whether lowered C code commonly produces scf.execute_region operations and whether Polygeist needs this path. Done means documenting the finding and deciding whether to retain or remove the lowering.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.