[PATCH] D77852: Outline CFI Instructions in Tail Calls

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 20:40:45 PDT 2020


paquette added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:1221
 
+InstructionMapper Mapper;
+
----------------
Why is this out here?


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:5867-5869
+      if (mit->isCFIInstruction()) {
+        return true;
+      }
----------------
Typically in LLVM, we prefer omitting braces on `if`s with a single line of code.

I think running clang-format should handle this automatically.

Also variable names are written with a capital letter in LLVM. (see: https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly)


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:6173-6177
   // We can only outline these if we will tail call the outlined function, or
   // fix up the CFI offsets. For the sake of safety, don't outline CFI
   // instructions.
   //
   // FIXME: If the proper fixups are implemented, this should be possible.
----------------
Comment is outdated now


================
Comment at: llvm/test/CodeGen/AArch64/machine-outliner-cfi.mir:6
+# it requires fixups. Show that we don't include CFI instructions in non
+# tail call outlined sequences right now.
 
----------------
This testcase is the same as the new one you're adding, right?

I don't think we need both testcases if so. I think it would be better to just keep this one and not add a new, identical test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77852





More information about the llvm-commits mailing list