Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2016 21:05:17 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r308867 - projects/clang390-import/contrib/llvm/lib/Target/X86
Message-ID:  <201611192105.uAJL5HM8078207@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Nov 19 21:05:17 2016
New Revision: 308867
URL: https://svnweb.freebsd.org/changeset/base/308867

Log:
  Work around LLVM PR30879, which is about a bad interaction between X86
  Call Frame Optimization on i386 and libunwind, by disallowing the
  optimization for i386-freebsd12.
  
  This should fix some instances of broken exception handling when frame
  pointers are omitted, in particular some unittests run during the build
  of editors/libreoffice.
  
  This hack will be removed as soon as upstream has implemented a more
  permanent fix for this problem.
  
  Upstream PR:	https://llvm.org/bugs/show_bug.cgi?id=30879
  Reviewed by:	emaste
  PR:		212343

Modified:
  projects/clang390-import/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp

Modified: projects/clang390-import/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
==============================================================================
--- projects/clang390-import/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp	Sat Nov 19 20:03:59 2016	(r308866)
+++ projects/clang390-import/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp	Sat Nov 19 21:05:17 2016	(r308867)
@@ -125,6 +125,11 @@ bool X86CallFrameOptimization::isLegal(M
   if (NoX86CFOpt.getValue())
     return false;
 
+  // Work around LLVM PR30879 (bad interaction between CFO and libunwind)
+  if (STI->isTargetFreeBSD() && STI->is32Bit() &&
+      STI->getTargetTriple().getOSMajorVersion() >= 12)
+    return false;
+
   // We can't encode multiple DW_CFA_GNU_args_size or DW_CFA_def_cfa_offset
   // in the compact unwind encoding that Darwin uses. So, bail if there
   // is a danger of that being generated.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611192105.uAJL5HM8078207>