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
This commit is contained in:
Diego Novillo 2013-12-06 17:58:19 +00:00
parent 43d8e6cb3b
commit 67fe87fc5e
2 changed files with 5 additions and 0 deletions

View File

@ -369,6 +369,8 @@ def fno_autolink : Flag <["-"], "fno-autolink">, Group<f_Group>,
def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">, def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">,
Group<f_Group>, Flags<[DriverOption, CC1Option]>, Group<f_Group>, Flags<[DriverOption, CC1Option]>,
HelpText<"Enable sample-based profile guided optimizations">; 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]>, def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CC1Option]>,
HelpText<"Enable the 'blocks' language feature">; HelpText<"Enable the 'blocks' language feature">;

View File

@ -54,6 +54,9 @@
// RUN: %clang -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s // 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" // 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 -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 -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 // RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s