Skip to content

[LowerToHW] Avoid "assert/assume/cover" string comparison, refactor label creation, NFC#10251

Open
uenoku wants to merge 1 commit intollvm:mainfrom
uenoku:dev/hidetou/clean-up-verif-2
Open

[LowerToHW] Avoid "assert/assume/cover" string comparison, refactor label creation, NFC#10251
uenoku wants to merge 1 commit intollvm:mainfrom
uenoku:dev/hidetou/clean-up-verif-2

Conversation

@uenoku
Copy link
Copy Markdown
Member

@uenoku uenoku commented Apr 17, 2026

Stop using "assert/assume/cover" string to specify a kind. Also factored out label creation.

Alternatively I considered to use declarative trait-based abstraction (like below) but did't like it because of heavy usage of templates, though it's still unfortunate to see there are 4 different target ops.

struct AssertVerif {
  using ImmediateOp = sv::AssertOp;
  using ConcurrentOp = sv::AssertConcurrentOp;
  using ClockedOp = verif::ClockedAssertOp;
  using VerifImmediateOp = verif::AssertOp;

  static constexpr StringLiteral labelPrefix = "assert__";
  static constexpr bool isCover = false;
  static constexpr bool supportsIfElseFatal = true;
};

Assisted-by: Codex: GPT 5.4

@uenoku uenoku force-pushed the dev/hidetou/clean-up-verif-2 branch from 6e2dc82 to 7db857f Compare April 17, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant