[PATCH] D87430: [ARM] Add heuristic to avoid lowering calls to blx for Thumb1 in ARMTargetLowering::LowerCall

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 12:20:34 PDT 2020


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:2261
+      // Hardcoded for now.
+      unsigned nRegs = 7;
+
----------------
Hmm. Not sure. Perhaps this can use something like getRegClassFor(MVT::i32)->getNumRegs()? It's still probably a very rough estimate of allocatable registers.


================
Comment at: llvm/test/CodeGen/ARM/minsize-call-cse-2.ll:11
+; CHECK: bl g
+define void @f(i32* %p, i32 %x, i32 %y, i32 %z, i32 %a) optsize minsize  {
+entry:
----------------
Can you add more tests of various sizes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87430



More information about the llvm-commits mailing list