[PATCH] D79785: [ARM] Register pressure with -mthumb forces register reload before each call

Prathamesh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 07:52:50 PDT 2020


prathamesh added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:2236
+        // FIXME: How to obtain number of available registers ?
+        // Hardcoded for now.
+        if (F.arg_size() + CallInstruction->getNumOperands() >= 7)
----------------
dmgreen wrote:
> efriedma wrote:
> > I wrote a check for the number of arguments in a different way at https://reviews.llvm.org/D49465 ; maybe you can borrow that?  Checking the number of operands in the IR is a very inaccurate approximation.
> I would recommend trying to keep this patch small and separating any other changes into a different review. The foldMemoryOperandImpl change seems to improve things on it's own. If we get that in first we can move on to figuring out an appropriate heuristic for this part separately.
Hi Eli,
Thanks for the suggestions! As suggested by Dave, I will try to address the heuristic in a follow up patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79785



More information about the llvm-commits mailing list