diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2022-01-12 12:35:36 +0000 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2022-01-12 13:28:01 +0000 |
commit | 6a605b97a2006bd391f129a606483656b7c6fb28 (patch) | |
tree | a8bf0a3c46640f3524c2fa11d8a1ab82de2bb5a1 /llvm/lib/CodeGen/CommandFlags.cpp | |
parent | 23e8a4d16018076e6eed4aa821c020b7fe348c69 (diff) | |
download | llvm-6a605b97a2006bd391f129a606483656b7c6fb28.zip llvm-6a605b97a2006bd391f129a606483656b7c6fb28.tar.gz llvm-6a605b97a2006bd391f129a606483656b7c6fb28.tar.bz2 |
[DebugInfo] Move flag for instr-ref to LLVM option, from TargetOptions
This feature was previously controlled by a TargetOptions flag, and I
figured that codegen::InitTargetOptionsFromCodeGenFlags would default it
to "on" for all frontends. Enabling by default was discussed here:
https://lists.llvm.org/pipermail/llvm-dev/2021-November/153653.html
and originally supposed to happen in 3c045070882f3, but it didn't actually
take effect, as it turns out frontends initialize TargetOptions themselves.
This patch moves the flag from a TargetOptions flag to a global flag to
CodeGen, where it isn't immediately affected by the frontend being used.
Hopefully this will actually cause instr-ref to be on by default on x86_64
now!
This patch is easily reverted, and chances of turbulence are moderately
high. If you need to revert, please consider instead commenting out the
'return true' part of llvm::debuginfoShouldUseDebugInstrRef to turn the
feature off, and dropping me an email.
Differential Revision: https://reviews.llvm.org/D116821
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CommandFlags.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp index 4543a88..1d50e1d 100644 --- a/llvm/lib/CodeGen/CommandFlags.cpp +++ b/llvm/lib/CodeGen/CommandFlags.cpp @@ -90,7 +90,6 @@ CGOPT(bool, EnableAddrsig) CGOPT(bool, EmitCallSiteInfo) CGOPT(bool, EnableMachineFunctionSplitter) CGOPT(bool, EnableDebugEntryValues) -CGOPT_EXP(bool, ValueTrackingVariableLocations) CGOPT(bool, ForceDwarfFrameSection) CGOPT(bool, XRayOmitFunctionIndex) CGOPT(bool, DebugStrictDwarf) @@ -433,12 +432,6 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() { cl::init(false)); CGBINDOPT(EnableDebugEntryValues); - static cl::opt<bool> ValueTrackingVariableLocations( - "experimental-debug-variable-locations", - cl::desc("Use experimental new value-tracking variable locations"), - cl::init(false)); - CGBINDOPT(ValueTrackingVariableLocations); - static cl::opt<bool> EnableMachineFunctionSplitter( "split-machine-functions", cl::desc("Split out cold basic blocks from machine functions based on " @@ -539,12 +532,6 @@ codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) { Options.DebugStrictDwarf = getDebugStrictDwarf(); Options.LoopAlignment = getAlignLoops(); - if (auto Opt = getExplicitValueTrackingVariableLocations()) - Options.ValueTrackingVariableLocations = *Opt; - else - Options.ValueTrackingVariableLocations = - getDefaultValueTrackingVariableLocations(TheTriple); - Options.MCOptions = mc::InitMCTargetOptionsFromFlags(); Options.ThreadModel = getThreadModel(); @@ -698,8 +685,3 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features, setFunctionAttributes(CPU, Features, F); } -bool codegen::getDefaultValueTrackingVariableLocations(const llvm::Triple &T) { - if (T.getArch() == llvm::Triple::x86_64) - return true; - return false; -} |