[PATCH] D67148: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 18:51:05 PDT 2019


hfinkel added a comment.

Thanks for looking at this (it's been a problem for a long time). Let me suggest a different interface, which I believe will improve generality and reduce code duplication in the register-pressure estimator, and let me know what you think...

  // Return the number of registers in the target-provided register class.
  unsigned getNumberOfRegisters(unsigned ClassID = 0) const;
  
  // Return the target-provided register class for the provided type.
  unsigned getRegisterClassForType(Type *Ty) const;

The idea, then, is that we just calculate register usage for each register class separately (i.e., keep a hash table), and then when computing the interleaving factor, etc. we just iterate over all of the register classes returned by the target, and pick the smallest interleaving factor calculated over all of the register classes. There's probably even a nice way to construct a default implementation of this in the backend (although that we'd save for follow-up work).


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67148/new/

https://reviews.llvm.org/D67148





More information about the llvm-commits mailing list