[PATCH] D70126: [PowerPC] Refactor FinishCall

Zarko Todorovski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 06:35:46 PST 2019


ZarkoCA added a comment.

Overall, I think this refactor aids in readability and clarity of calling convention code PPCISelLowering.cpp. Even small changes like renaming InFlag to Glue go a long way in helping understanding.



================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5049
+    // represents the 2 instruction sequence of an indirect branch and link,
+    // immeidatly followed by a load of the TOC pointer from the the stack save
+    // slot into gpr2.
----------------
spelling nits: 
 abis -> ABIs 
"callers TOC pointer" -> caller's TOC pointer
pseduo->pseudo
immeidatly ->immediately


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5197
+
+  // One for loading the environement pointer.
+  SDValue PtrOff = DAG.getIntPtrConstant(16, dl);
----------------
*environment


================
Comment at: llvm/lib/Target/PowerPC/PPCSubtarget.h:352
+  bool usesFunctionDescriptors() const {
+    return isAIXABI() || (is64BitELFABI() && !isELFv2ABI());
+  }
----------------
I was looking into this, and does the SVR4ABI refer to both ELF v1 and ELF v2? Is that why you can't use isSVR4ABI but instead check that it's not ELFv2? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70126





More information about the llvm-commits mailing list