Turn off the old way of handling debug information in the code generator. Use
[oota-llvm.git] / lib / Target / X86 / README-X86-64.txt
index bc19986eba43efdbdc768e54270325a15d3bf4e8..1f3d17bd27014c4c16914c0e500f6ac224d06cf2 100644 (file)
@@ -9,10 +9,6 @@ Make use of "Red Zone".
 
 //===---------------------------------------------------------------------===//
 
-Implement __int128 and long double support.
-
-//===---------------------------------------------------------------------===//
-
 For this:
 
 extern void xx(void);
@@ -234,3 +230,26 @@ down by 8 and truncate it. It's not pretty but it works. We need some register
 allocation magic to make the hack go away (e.g. putting additional constraints
 on the result of the movb).
 
+//===---------------------------------------------------------------------===//
+
+The x86-64 ABI for hidden-argument struct returns requires that the
+incoming value of %rdi be copied into %rax by the callee upon return.
+
+The idea is that it saves callers from having to remember this value,
+which would often require a callee-saved register. Callees usually
+need to keep this value live for most of their body anyway, so it
+doesn't add a significant burden on them.
+
+We currently implement this in codegen, however this is suboptimal
+because it means that it would be quite awkward to implement the
+optimization for callers.
+
+A better implementation would be to relax the LLVM IR rules for sret
+arguments to allow a function with an sret argument to have a non-void
+return type, and to have the front-end to set up the sret argument value
+as the return value of the function. The front-end could more easily
+emit uses of the returned struct value to be in terms of the function's
+lowered return value, and it would free non-C frontends from a
+complication only required by a C-based ABI.
+
+//===---------------------------------------------------------------------===//