r196589 - Add flag -fauto-profile as alias to -fprofile-sample-use.
Diego Novillo
dnovillo at google.com
Fri Dec 6 09:58:19 PST 2013
Author: dnovillo
Date: Fri Dec 6 11:58:19 2013
New Revision: 196589
URL: http://llvm.org/viewvc/llvm-project?rev=196589&view=rev
Log:
Add flag -fauto-profile as alias to -fprofile-sample-use.
Summary:
GCC uses -fauto-profile to enable sample-based PGO. This patch
adds it to Clang as an alias for -fprofile-sample-use.
Differential Revision: http://llvm-reviews.chandlerc.com/D2353
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/clang_f_opts.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=196589&r1=196588&r2=196589&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Dec 6 11:58:19 2013
@@ -369,6 +369,8 @@ def fno_autolink : Flag <["-"], "fno-aut
def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">,
Group<f_Group>, Flags<[DriverOption, CC1Option]>,
HelpText<"Enable sample-based profile guided optimizations">;
+def fauto_profile_EQ : Joined<["-"], "fauto-profile=">,
+ Alias<fprofile_sample_use_EQ>;
def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CC1Option]>,
HelpText<"Enable the 'blocks' language feature">;
Modified: cfe/trunk/test/Driver/clang_f_opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=196589&r1=196588&r2=196589&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang_f_opts.c (original)
+++ cfe/trunk/test/Driver/clang_f_opts.c Fri Dec 6 11:58:19 2013
@@ -54,6 +54,9 @@
// RUN: %clang -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s
// CHECK-SAMPLE-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
+// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s
+// CHECK-AUTO-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
+
// RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
// RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
// RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
More information about the cfe-commits
mailing list