From 1d62be244108547558c6d42ddcf2e4a7f3c6dd03 Mon Sep 17 00:00:00 2001 From: Ian Levesque Date: Fri, 17 Jan 2020 13:24:16 -0800 Subject: [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 --- clang/lib/Frontend/CompilerInvocation.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') 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); -- cgit v1.1