From 2ba7e80886e75bb069908fe3f3067fbb638f8922 Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Wed, 26 Jun 2019 08:35:43 +0000 Subject: [PATCH] [TargetOption] Add option to ebanble the debug entry values The option enables debug info about parameter's entry values. ([2/13] Introduce the debug entry values.) Co-authored-by: Ananth Sowda Co-authored-by: Nikola Prica Co-authored-by: Ivan Baev Differential Revision: https://reviews.llvm.org/D60961 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364395 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/CommandFlags.inc | 6 ++++++ include/llvm/Target/TargetOptions.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/llvm/CodeGen/CommandFlags.inc b/include/llvm/CodeGen/CommandFlags.inc index 5b9564c1062..cb69e9f6140 100644 --- a/include/llvm/CodeGen/CommandFlags.inc +++ b/include/llvm/CodeGen/CommandFlags.inc @@ -271,6 +271,11 @@ static cl::opt EnableAddrsig("addrsig", cl::desc("Emit an address-significance table"), cl::init(false)); +static cl::opt + EnableDebugEntryValues("debug-entry-values", + cl::desc("Emit debug info about parameter's entry values"), + cl::init(false)); + // Common utility function tightly tied to the options listed here. Initializes // a TargetOptions object with CodeGen flags and returns it. static TargetOptions InitTargetOptionsFromCodeGenFlags() { @@ -300,6 +305,7 @@ static TargetOptions InitTargetOptionsFromCodeGenFlags() { Options.ExceptionModel = ExceptionModel; Options.EmitStackSizeSection = EnableStackSizeSection; Options.EmitAddrsig = EnableAddrsig; + Options.EnableDebugEntryValues = EnableDebugEntryValues; Options.MCOptions = InitMCTargetOptionsFromFlags(); diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h index 6b76a11651a..8cc2a601087 100644 --- a/include/llvm/Target/TargetOptions.h +++ b/include/llvm/Target/TargetOptions.h @@ -118,7 +118,8 @@ namespace llvm { NoTrapAfterNoreturn(false), EmulatedTLS(false), ExplicitEmulatedTLS(false), EnableIPRA(false), EmitStackSizeSection(false), EnableMachineOutliner(false), - SupportsDefaultOutlining(false), EmitAddrsig(false) {} + SupportsDefaultOutlining(false), EmitAddrsig(false), + EnableDebugEntryValues(false) {} /// PrintMachineCode - This flag is enabled when the -print-machineinstrs /// option is specified on the command line, and should enable debugging @@ -252,6 +253,9 @@ namespace llvm { /// Emit address-significance table. unsigned EmitAddrsig : 1; + /// Emit debug info about parameter's entry values. + unsigned EnableDebugEntryValues : 1; + /// FloatABIType - This setting is set by -float-abi=xxx option is specfied /// on the command line. This setting may either be Default, Soft, or Hard. /// Default selects the target's default behavior. Soft selects the ABI for -- 2.50.1