[PATCH] D57838: [clang-cl] support /Oy- on aarch64

2021-03-11 Thread Kevin Rico via Phabricator via cfe-commits
krico4272 added a comment.
Herald added a subscriber: danielkiss.

In D57838#1388400 , @mstorsjo wrote:

> LGTM



In D57838#1388400 , @mstorsjo wrote:

> LGTM

F15823649: reboot.zip 


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57838/new/

https://reviews.llvm.org/D57838

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D57838: [clang-cl] support /Oy- on aarch64

2019-02-07 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rC353402: [clang-cl] support /Oy- on aarch64 (authored by 
mstorsjo, committed by ).

Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57838/new/

https://reviews.llvm.org/D57838

Files:
  lib/Driver/ToolChains/MSVC.cpp
  test/Driver/cl-options.c


Index: test/Driver/cl-options.c
===
--- test/Driver/cl-options.c
+++ test/Driver/cl-options.c
@@ -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"
 
Index: lib/Driver/ToolChains/MSVC.cpp
===
--- lib/Driver/ToolChains/MSVC.cpp
+++ lib/Driver/ToolChains/MSVC.cpp
@@ -1407,10 +1407,10 @@
   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;
@@ -1441,8 +1441,8 @@
   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


Index: test/Driver/cl-options.c
===
--- test/Driver/cl-options.c
+++ test/Driver/cl-options.c
@@ -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"
 
Index: lib/Driver/ToolChains/MSVC.cpp
===
--- lib/Driver/ToolChains/MSVC.cpp
+++ lib/Driver/ToolChains/MSVC.cpp
@@ -1407,10 +1407,10 @@
   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;
@@ -1441,8 +1441,8 @@
   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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D57838: [clang-cl] support /Oy- on aarch64

2019-02-07 Thread Nathan Froyd via Phabricator via cfe-commits
froydnj added a comment.

Thanks for the review, @mstorsjo.  Would you please land this for me?  I don't 
have commit access.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57838/new/

https://reviews.llvm.org/D57838



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D57838: [clang-cl] support /Oy- on aarch64

2019-02-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision.
mstorsjo added a comment.
This revision is now accepted and ready to land.

LGTM


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57838/new/

https://reviews.llvm.org/D57838



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D57838: [clang-cl] support /Oy- on aarch64

2019-02-06 Thread Nathan Froyd via Phabricator via cfe-commits
froydnj created this revision.
froydnj added a reviewer: mstorsjo.
Herald added subscribers: cfe-commits, kristof.beyls, javed.absar.
Herald added a project: clang.

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


Repository:
  rC Clang

https://reviews.llvm.org/D57838

Files:
  lib/Driver/ToolChains/MSVC.cpp
  test/Driver/cl-options.c


Index: test/Driver/cl-options.c
===
--- test/Driver/cl-options.c
+++ test/Driver/cl-options.c
@@ -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"
 
Index: lib/Driver/ToolChains/MSVC.cpp
===
--- lib/Driver/ToolChains/MSVC.cpp
+++ lib/Driver/ToolChains/MSVC.cpp
@@ -1407,10 +1407,10 @@
   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;
@@ -1441,8 +1441,8 @@
   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


Index: test/Driver/cl-options.c
===
--- test/Driver/cl-options.c
+++ test/Driver/cl-options.c
@@ -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"
 
Index: lib/Driver/ToolChains/MSVC.cpp
===
--- lib/Driver/ToolChains/MSVC.cpp
+++ lib/Driver/ToolChains/MSVC.cpp
@@ -1407,10 +1407,10 @@
   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;
@@ -1441,8 +1441,8 @@
   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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits