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

Machreg refactor #146

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pawosm-arm
Copy link
Collaborator

@pawosm-arm pawosm-arm commented Jul 18, 2017

Currently used machreg is too much x86_64 specific. Proposed change makes it easier to provide architecture-specific tuning and as an example it introduces some tuning for AArch64.

Signed-off-by: Paul Osmialowski <pawel.osmialowski@arm.com>
…unused functions

Signed-off-by: Paul Osmialowski <pawel.osmialowski@arm.com>
Signed-off-by: Paul Osmialowski <pawel.osmialowski@arm.com>
Copy link
Collaborator

@bryanpkc bryanpkc left a comment

Choose a reason for hiding this comment

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

Tested in our downstream builds. LGTM.

@kiranchandramohan
Copy link
Collaborator

ping @SouraVX @shivaramaarao

@kiranchandramohan
Copy link
Collaborator

@pawosm-arm AMD engineers need some documentation to proceed.

@pawosm-arm
Copy link
Collaborator Author

pawosm-arm commented May 21, 2021

Hi @kiranchandramohan,
This was purely conceptual work with no documentation ever written.
This PR consists of three commits:

  1. machreg: AArch64 has 64-bit registers, no need to pack, this commit removes unnecessary operation that remained in flang from the times where it didn't distinguish between 32- and 64-bit ARM architectures. This is one of the last places like that still remaining in flang's codebase
  2. machreg: in order to ease further arch specific improvements, remove unused functions. Before I started to make this machreg code more architecturarly-neutral I've found some pieces of code that were never used; this commit removes these pieces of code just to make it easier to work with.
  3. machreg: architecture specific initializations. This is the main thing. Things normally defined in tools/flang2/flang2exe/machreg.cpp file were moved to corresponding machreg.h headers (as preprocessor definitions) for individual architectures to make it easier to work on specific architectural tweaks.
    Having those changes applied I could do my experiments in aarch64-Linux/machreg.h file. Not seeing much of the performance impact, I gave up eventually, nevertheless, I decided to make this refactor public so anyone else could make more creative use of it.

@kiranchandramohan
Copy link
Collaborator

Is the information provided by @pawosm-arm sufficient for @shivaramaarao and @SouraVX ?

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.

None yet

3 participants