flang icon indicating copy to clipboard operation
flang copied to clipboard

Machreg refactor

Open pawosm-arm opened this issue 7 years ago • 4 comments

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.

pawosm-arm avatar Jul 18 '17 12:07 pawosm-arm

ping @SouraVX @shivaramaarao

kiranchandramohan avatar May 04 '21 14:05 kiranchandramohan

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

kiranchandramohan avatar May 19 '21 15:05 kiranchandramohan

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.

pawosm-arm avatar May 21 '21 13:05 pawosm-arm

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

kiranchandramohan avatar Jun 02 '21 14:06 kiranchandramohan