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

We should have a LiveRegUnits utility class #27983

Closed
MatzeB opened this issue May 3, 2016 · 4 comments
Closed

We should have a LiveRegUnits utility class #27983

MatzeB opened this issue May 3, 2016 · 4 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@MatzeB
Copy link
Contributor

MatzeB commented May 3, 2016

Bugzilla Link 27609
Resolution FIXED
Resolved on Jun 16, 2017 17:23
Version trunk
OS All
CC @atrick,@qcolombet

Extended Description

This is not a bug but a possible code cleanup/slight performance improvement. Just wanted to document my thoughts on it.

We currently use LivePhysRegs as a general purpose register liveness utility. It is used after register allocation to start at the end of a basic block and move upwards while maintaining the set of live registers.

LivePhysReg currently tracks live registers, while for most purposes it would be enough to track liveness of the register units. In fact LivePhysRegs code comes from a LiveRegUnits class but was changed to track registers in r197253 probably because that was needed by one of the first users (StackMapLivenessAnalysis).
Looking at our code today I believe most users of LivePhysRegs should work as well with LiveRegUnits while maintaining a set of register units should be slightly more efficient than updating a set of live registers. There are also out of tree targets with a gigantic number of tuple registers which would certainly need a LiveRegUnits class if they ever need this functionality.

We should also look into the RegScavenger class. Part of what it does is what a LiveRegUnits class would do, so that we could reuse the LiveRegUnits class in the RegScavenger.

@MatzeB
Copy link
Contributor Author

MatzeB commented May 3, 2016

assigned to @MatzeB

@qcolombet
Copy link
Collaborator

FWIW I am supportive of the idea!

@MatzeB
Copy link
Contributor Author

MatzeB commented Jul 1, 2016

Patch submitted: http://reviews.llvm.org/D21916

@MatzeB
Copy link
Contributor Author

MatzeB commented Jun 17, 2017

This landed a while ago in r279171

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen
Projects
None yet
Development

No branches or pull requests

2 participants