[llvm-branch-commits] [cfe-branch] r353829 - Merging r353402:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 12 03:12:23 PST 2019


Author: hans
Date: Tue Feb 12 03:12:23 2019
New Revision: 353829

URL: http://llvm.org/viewvc/llvm-project?rev=353829&view=rev
Log:
Merging r353402:
------------------------------------------------------------------------
r353402 | mstorsjo | 2019-02-07 13:46:49 +0100 (Thu, 07 Feb 2019) | 7 lines

[clang-cl] support /Oy- on aarch64

MSVC supports /Oy- on aarch64, so clang-cl should too.

Patch by Nathan Froyd!

Differential Revision: https://reviews.llvm.org/D57838
------------------------------------------------------------------------

Modified:
    cfe/branches/release_80/   (props changed)
    cfe/branches/release_80/lib/Driver/ToolChains/MSVC.cpp
    cfe/branches/release_80/test/Driver/cl-options.c

Propchange: cfe/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 12 03:12:23 2019
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:351334,351340,351344,351360,351457,351459,351531,351579-351580,352040,352079,352099,352102,352105,352156,352221-352222,352229,352307,352323,352463,352539,352610,352672,352822,353142,353393,353411,353431,353493,353495
+/cfe/trunk:351334,351340,351344,351360,351457,351459,351531,351579-351580,352040,352079,352099,352102,352105,352156,352221-352222,352229,352307,352323,352463,352539,352610,352672,352822,353142,353393,353402,353411,353431,353493,353495
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_80/lib/Driver/ToolChains/MSVC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_80/lib/Driver/ToolChains/MSVC.cpp?rev=353829&r1=353828&r2=353829&view=diff
==============================================================================
--- cfe/branches/release_80/lib/Driver/ToolChains/MSVC.cpp (original)
+++ cfe/branches/release_80/lib/Driver/ToolChains/MSVC.cpp Tue Feb 12 03:12:23 2019
@@ -1408,10 +1408,10 @@ static void TranslateOptArg(Arg *A, llvm
           DAL.AddFlagArg(
               A, Opts.getOption(options::OPT_fno_omit_frame_pointer));
       } else {
-        // Don't warn about /Oy- in 64-bit builds (where
+        // Don't warn about /Oy- in x86-64 builds (where
         // SupportsForcingFramePointer is false).  The flag having no effect
         // there is a compiler-internal optimization, and people shouldn't have
-        // to special-case their build files for 64-bit clang-cl.
+        // to special-case their build files for x86-64 clang-cl.
         A->claim();
       }
       break;
@@ -1442,8 +1442,8 @@ MSVCToolChain::TranslateArgs(const llvm:
   DerivedArgList *DAL = new DerivedArgList(Args.getBaseArgs());
   const OptTable &Opts = getDriver().getOpts();
 
-  // /Oy and /Oy- only has an effect under X86-32.
-  bool SupportsForcingFramePointer = getArch() == llvm::Triple::x86;
+  // /Oy and /Oy- don't have an effect on X86-64
+  bool SupportsForcingFramePointer = getArch() != llvm::Triple::x86_64;
 
   // The -O[12xd] flag actually expands to several flags.  We must desugar the
   // flags so that options embedded can be negated.  For example, the '-O2' flag

Modified: cfe/branches/release_80/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_80/test/Driver/cl-options.c?rev=353829&r1=353828&r2=353829&view=diff
==============================================================================
--- cfe/branches/release_80/test/Driver/cl-options.c (original)
+++ cfe/branches/release_80/test/Driver/cl-options.c Tue Feb 12 03:12:23 2019
@@ -178,6 +178,10 @@
 // Oy_2: -momit-leaf-frame-pointer
 // Oy_2: -O2
 
+// RUN: %clang_cl --target=aarch64-pc-windows-msvc -Werror /Oy- /O2 -### -- %s 2>&1 | FileCheck -check-prefix=Oy_aarch64 %s
+// Oy_aarch64: -mdisable-fp-elim
+// Oy_aarch64: -O2
+
 // RUN: %clang_cl --target=i686-pc-win32 -Werror /O2 /O2 -### -- %s 2>&1 | FileCheck -check-prefix=O2O2 %s
 // O2O2: "-O2"
 




More information about the llvm-branch-commits mailing list