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

Oliver Stannard (Linaro) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 06:37:20 PDT 2020


ostannard added a comment.

I'd expect to see some extra checks to decide if reverting the indirect-call optimisation is profitable or not. If the loaded address is used more than three times, without being spilled, then I think it's better to leave the calls as indirect ones. If you don't think this is ever likely to be worthwhile for thumb 1, then it would be better to modify ARMTargetLowering::LowerCall to not do the transformation in the first place.



================
Comment at: llvm/test/CodeGen/ARM/minsize-call-cse-2.ll:8
+; CHECK: bl g
+; CHECK: blx r
+; CHECK: bl g
----------------
Why is one of the calls being left as an indirect branch?


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