Skip to content
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

Convert Vec dynamic index with a literal to static index #3314

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

jackkoenig
Copy link
Contributor

This reduces the amount of work that both Chisel and firtool have to do.

Contributor Checklist

  • [NA] Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • Performance improvement

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference).

Release Notes

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • Did you mark the proper milestone (Bug fix: 3.5.x or 3.6.x depending on impact, API modification or big change: 5.0.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you do one of the following when ready to merge:
    • Squash: You/ the contributor Enable auto-merge (squash), clean up the commit message, and label with Please Merge.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@jackkoenig jackkoenig added the Performance Improves performance, will be included in release notes label Jun 1, 2023
@jackkoenig jackkoenig added this to the 3.6.x milestone Jun 1, 2023
@jackkoenig jackkoenig force-pushed the const-prop-vec-dynamic-index branch from 66e9a7a to fd3eeb1 Compare June 1, 2023 20:01
Comment on lines 301 to 304
if (p.isLit) {
return this.apply(p.litValue.intValue)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aswaterman has reminded me that we actually support out-of-bounds indices currently which means this could cause some currently working code to become an error. I'm going to change this to not accidentally change semantics and open a separate PR making those out-of-bounds indices a warning à la #3033.

@jackkoenig jackkoenig force-pushed the const-prop-vec-dynamic-index branch from fd3eeb1 to 4a68cdf Compare June 1, 2023 23:43
@jackkoenig jackkoenig enabled auto-merge (squash) June 1, 2023 23:44
@jackkoenig jackkoenig merged commit e20a038 into main Jun 2, 2023
@jackkoenig jackkoenig deleted the const-prop-vec-dynamic-index branch June 2, 2023 00:02
@mergify mergify bot added the Backported This PR has been backported label Jun 2, 2023
mergify bot pushed a commit that referenced this pull request Jun 2, 2023
mergify bot pushed a commit that referenced this pull request Jun 2, 2023
mergify bot added a commit that referenced this pull request Jun 2, 2023
(cherry picked from commit e20a038)

Co-authored-by: Jack Koenig <koenig@sifive.com>
mergify bot added a commit that referenced this pull request Jun 2, 2023
(cherry picked from commit e20a038)

Co-authored-by: Jack Koenig <koenig@sifive.com>
@sequencer sequencer mentioned this pull request Jun 20, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported This PR has been backported Performance Improves performance, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants