Skip to content

[CIR] Simplify ConstantOp accesses and its getDefiningOp #1764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2025

Conversation

xlauko
Copy link
Collaborator

@xlauko xlauko commented Jul 27, 2025

  • Replaces dyn_castcir::ConstantOp(v.getDefiningOp()) and similar with v.getDefiningOpcir::ConstantOp()
  • Adds getValueAttr, getIntValue and getBoolValue methods to ConstantOp

- Replaces  dyn_cast<cir::ConstantOp>(v.getDefiningOp()) and similar with v.getDefiningOp<cir::ConstantOp>()
- Adds `getValueAttr`, `getIntValue` and `getBoolValue` methods to ConstantOp
@xlauko
Copy link
Collaborator Author

xlauko commented Jul 27, 2025

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super neat! LGTM

@xlauko
Copy link
Collaborator Author

xlauko commented Jul 29, 2025

Merge activity

  • Jul 29, 5:43 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 29, 5:44 AM UTC: @xlauko merged this pull request with Graphite.

@xlauko xlauko merged commit e571d1c into main Jul 29, 2025
9 of 12 checks passed
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.

2 participants