- implement -msave-args in clang/llvm, like the sun did for gcc
- Turn on -mretpoline by default in clang on amd64.

Index: lib/Target/X86/X86Subtarget.h
--- lib/Target/X86/X86Subtarget.h.orig
+++ lib/Target/X86/X86Subtarget.h
@@ -481,6 +481,9 @@ class X86Subtarget final : public X86GenSubtargetInfo 
 
   Align TileConfigAlignment = Align(4);
 
+  /// Whether function prologues should save register arguments on the stack.
+  bool SaveArgs = false;
+
   /// Max. memset / memcpy size that is turned into rep/movs, rep/stos ops.
   ///
   // FIXME: this is a known good value for Yonah. How about others?
@@ -567,6 +570,8 @@ class X86Subtarget final : public X86GenSubtargetInfo 
   unsigned getTileConfigSize() const { return 64; }
   Align getTileConfigAlignment() const { return TileConfigAlignment; }
 
+  bool getSaveArgs() const { return SaveArgs; }
+
   /// Returns the minimum alignment known to hold of the
   /// stack frame on entry to the function and which must be maintained by every
   /// function for this subtarget.
@@ -832,6 +837,7 @@ class X86Subtarget final : public X86GenSubtargetInfo 
 
   bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
   bool isTargetFreeBSD() const { return TargetTriple.isOSFreeBSD(); }
+  bool isTargetOpenBSD() const { return TargetTriple.isOSOpenBSD(); }
   bool isTargetDragonFly() const { return TargetTriple.isOSDragonFly(); }
   bool isTargetSolaris() const { return TargetTriple.isOSSolaris(); }
   bool isTargetPS4() const { return TargetTriple.isPS4CPU(); }
