[PATCH] AArch64 : Implement GHC calling convention.

Greg Fitzgerald garious at gmail.com
Fri Jan 9 11:58:51 PST 2015


Erik, thanks for doing this work.  I'd love to see GHC AArch64 support make it into 3.6.  I'd be more comfortable with this patch if there was a bit more information about the .td file changes and if the test had coverage similar to the X86_64 one (see: test/CodeGen/X86/ghc-cc64.ll).


================
Comment at: lib/Target/AArch64/AArch64CallingConvention.td:208
@@ +207,3 @@
+//===----------------------------------------------------------------------===//
+// ARM64 Calling Convention for GHC
+//===----------------------------------------------------------------------===//
----------------
Is there a document you can reference here?

================
Comment at: lib/Target/AArch64/AArch64CallingConvention.td:213
@@ +212,3 @@
+  // Handle all vector types as either f64 or v2f64.
+  CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType<f64>>,
+  CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32, f128], CCBitConvertToType<v2f64>>,
----------------
I'm having trouble groking this.  It looks like a combination of the X86 GHC version and CC_AArch64_AAPCS (perhaps an old version?).  I wonder, is it possible to inherit from CC_AArch64_AAPCS and tweak the derived version for GHC?

================
Comment at: test/CodeGen/AArch64/ghc-tcreturn-lowered.ll:14
@@ +13,3 @@
+
+define cc10 void @test_indirect_tail() {
+; CHECK-LABEL: test_indirect_tail:
----------------
Does this case add coverage?  Compared to the one above, seems like it would only affect the bitcode just before the tail call.

http://reviews.llvm.org/D6877

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list