llvm / llvm/circt

[Sim] Combine integer formatting ops into one op

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

Description

@fzi-hielscher I was wondering what your thoughts are on maybe combining the integer formatting operations `sim.fmt.hex`, `sim.fmt.bin`, and `sim.fmt.dec` into a single `sim.fmt.int` operation. The Moore dialect wants to lower to these ops, and there are additional formatting options (width, alignment, zero/space padding) that apply to each of these ops. If we made the integer radix a parameter on the op, we might only have to add these formatting options to a single op. WDYT?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the sim.fmt.hex, sim.fmt.bin, and sim.fmt.dec operations and the Moore dialect lowering mentioned in the issue. Determine whether a radix-parameterized sim.fmt.int operation should consolidate the shared width, alignment, and padding options; done means the design is agreed and the affected lowering paths are identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
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.