[PATCH] D27392: Vectorcall Calling Convention - Adding CodeGen Complete Support

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 11:23:27 PST 2016


majnemer added inline comments.


================
Comment at: include/llvm/CodeGen/CallingConvLower.h:542-543
+  /// After running, it will sort the locs list.
+  template<class T>
+  void AnalyzeArgumentsSecondPass(const SmallVectorImpl<T>& Args, CCAssignFn Fn) {
+    unsigned NumFirstPassLocs = Locs.size();
----------------
Please clang-format this.
Also, I think `Args` should be an `ArrayRef<T>`.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7740
+        if (CLI.CallConv == CallingConv::X86_VectorCall &&
+            (isa<StructType>(FinalType))) {
+          // The first value of a structure is marked
----------------
Please remove the extra parens.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8038
+        if (F.getCallingConv() == CallingConv::X86_VectorCall &&
+            (isa<StructType>(I->getType()))) {
+          // The first value of a structure is marked
----------------
Ditto.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:2756-2759
+  return std::is_sorted(ArgLocs.begin(), ArgLocs.end(), 
+                      [](const CCValAssign &A, const CCValAssign &B) -> bool {
+                        return A.getValNo() < B.getValNo();
+                      });
----------------
This doesn't look correctly formatted.


Repository:
  rL LLVM

https://reviews.llvm.org/D27392





More information about the llvm-commits mailing list