[PATCH] D49459: [ARM] Avoid spilling lr with Thumb1 tail calls.

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 18 06:50:59 PDT 2018


chill added inline comments.


================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:1927
+    if (!LRSpilled && AFI->isThumb1OnlyFunction()) {
+      for (MachineBasicBlock &MBB : MF) {
+        if (!MBB.empty() &&
----------------
Instead of traversing all the blocks, would it be possible (or make sense) to set a flag in `ARMMachineFunctionInfo`, indicating that the function contains tail calls, whenever we create a `TC_RETURN` in `LowerCall`, 



================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:1927
+    if (!LRSpilled && AFI->isThumb1OnlyFunction()) {
+      for (MachineBasicBlock &MBB : MF) {
+        if (!MBB.empty() &&
----------------
chill wrote:
> Instead of traversing all the blocks, would it be possible (or make sense) to set a flag in `ARMMachineFunctionInfo`, indicating that the function contains tail calls, whenever we create a `TC_RETURN` in `LowerCall`, 
> 
Maybe `const MachineBasicBlock &` ?



Repository:
  rL LLVM

https://reviews.llvm.org/D49459





More information about the llvm-commits mailing list