diff options
author | Robert Grosse <grosse@chromium.org> | 2013-07-25 14:34:41 -0700 |
---|---|---|
committer | Robert Grosse <grosse@chromium.org> | 2013-07-25 14:34:41 -0700 |
commit | 7b390888fd9f3886d966ab072c328f4fbd9c64b4 (patch) | |
tree | 61d7d80f47627e5736931a1ae488377c92594f4c /include/clang | |
parent | 0adde5bbb53bfb2aadcb566c514efd3e218bf0bc (diff) |
Add a -finstrument-functions-size=n option to control basic block
filtering. If omitted entirely, the original behavior is restored.
This also undos the string and __pnacl_profile stuff from the previous
CL. Finally, it fixes and updates the -finstrument-function tests.
BUG=none
R=bradnelson@google.com, dschuff@chromium.org
Review URL: https://codereview.chromium.org/19793007
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Driver/CC1Options.td | 2 | ||||
-rw-r--r-- | include/clang/Driver/Options.td | 2 | ||||
-rw-r--r-- | include/clang/Frontend/CodeGenOptions.def | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 96a50fc5c6..eaa67ab1db 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -456,6 +456,8 @@ def fdeprecated_macro : Flag<["-"], "fdeprecated-macro">, HelpText<"Defines the __DEPRECATED macro">; def fno_deprecated_macro : Flag<["-"], "fno-deprecated-macro">, HelpText<"Undefines the __DEPRECATED macro">; +def finstrument_functions_size : Separate<["-"], "finstrument-functions-size">, + HelpText<"Minimum size of functions to instrument">; //===----------------------------------------------------------------------===// // Header Search Options diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 3a5358a7e3..fea7ba3c00 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -484,6 +484,8 @@ def finline_functions : Flag<["-"], "finline-functions">, Group<clang_ignored_f_ def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>; def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Generate calls to instrument function entry and exit">; +def finstrument_functions_size_EQ : Joined<["-"], "finstrument-functions-size=">, Group<f_Group>, Flags<[CC1Option]>, + HelpText<"Set a minimum number of basic blocks for function instrumentation">; def fkeep_inline_functions : Flag<["-"], "fkeep-inline-functions">, Group<clang_ignored_f_Group>; def flat__namespace : Flag<["-"], "flat_namespace">; def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>; diff --git a/include/clang/Frontend/CodeGenOptions.def b/include/clang/Frontend/CodeGenOptions.def index f6e2472cb9..63516e8684 100644 --- a/include/clang/Frontend/CodeGenOptions.def +++ b/include/clang/Frontend/CodeGenOptions.def @@ -62,6 +62,9 @@ CODEGENOPT(HiddenWeakVTables , 1, 0) ///< Emit weak vtables, RTTI, and thunks wi ///< hidden visibility. CODEGENOPT(InstrumentFunctions , 1, 0) ///< Set when -finstrument-functions is ///< enabled. +VALUE_CODEGENOPT(InstrumentFunctionsSize, 32, 0) ///< If set, only functions with + ///< at least this many basic + ///< blocks are instrumented. CODEGENOPT(InstrumentForProfiling , 1, 0) ///< Set when -pg is enabled. CODEGENOPT(LessPreciseFPMAD , 1, 0) ///< Enable less precise MAD instructions to ///< be generated. |