diff options
author | Ian Levesque <ianlevesque@fb.com> | 2020-01-17 13:24:16 -0800 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2020-01-17 13:32:24 -0800 |
commit | 1d62be244108547558c6d42ddcf2e4a7f3c6dd03 (patch) | |
tree | 7a3f11b861fed03556b00191773ce5f37a2929f3 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 7628e474a5916ed8a43c015248443f4c03077509 (diff) | |
download | llvm-1d62be244108547558c6d42ddcf2e4a7f3c6dd03.zip llvm-1d62be244108547558c6d42ddcf2e4a7f3c6dd03.tar.gz llvm-1d62be244108547558c6d42ddcf2e4a7f3c6dd03.tar.bz2 |
[clang][xray] Add -fxray-ignore-loops option
XRay allows tuning by minimum function size, but also always instruments
functions with loops in them. If the minimum function size is set to a
large value the loop instrumention ends up causing most functions to be
instrumented anyway. This adds a new flag, -fxray-ignore-loops, to disable
the loop detection logic.
Differential Revision: https://reviews.llvm.org/D72873
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index e1e5956..3671e08 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1091,6 +1091,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Args.hasArg(OPT_fxray_always_emit_typedevents); Opts.XRayInstructionThreshold = getLastArgIntValue(Args, OPT_fxray_instruction_threshold_EQ, 200, Diags); + Opts.XRayIgnoreLoops = + Args.hasArg(OPT_fxray_ignore_loops, OPT_fno_xray_ignore_loops, false); auto XRayInstrBundles = Args.getAllArgValues(OPT_fxray_instrumentation_bundle); |