diff options
| author | Diego Novillo <dnovillo@google.com> | 2013-12-06 17:58:19 +0000 |
|---|---|---|
| committer | Diego Novillo <dnovillo@google.com> | 2013-12-06 17:58:19 +0000 |
| commit | 67fe87fc5e57e7d93a3d1891adf81a3e18bfd86c (patch) | |
| tree | 860e0da2b3b0476e3796bfe9ac86fc1f67647044 | |
| parent | 43d8e6cb3b705b35d1fbe053e1a4b6dd52de95ef (diff) | |
| download | bcm5719-llvm-67fe87fc5e57e7d93a3d1891adf81a3e18bfd86c.tar.gz bcm5719-llvm-67fe87fc5e57e7d93a3d1891adf81a3e18bfd86c.zip | |
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
llvm-svn: 196589
| -rw-r--r-- | clang/include/clang/Driver/Options.td | 2 | ||||
| -rw-r--r-- | clang/test/Driver/clang_f_opts.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 9e7dc78d63c..f80069591a3 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -369,6 +369,8 @@ def fno_autolink : Flag <["-"], "fno-autolink">, Group<f_Group>, 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">; diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c index 8bf53e5e6dc..70826d7299f 100644 --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -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 |

