[llvm-branch-commits] [llvm] a03ffad - [DebugInfo] Re-enable instruction referencing for x86_64

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Feb 7 13:27:11 PST 2022


Author: Jeremy Morse
Date: 2022-02-07T13:26:39-08:00
New Revision: a03ffad5d34c6d1df14e25df17f18ea2fa437c0c

URL: https://github.com/llvm/llvm-project/commit/a03ffad5d34c6d1df14e25df17f18ea2fa437c0c
DIFF: https://github.com/llvm/llvm-project/commit/a03ffad5d34c6d1df14e25df17f18ea2fa437c0c.diff

LOG: [DebugInfo] Re-enable instruction referencing for x86_64

After discussion in D116821 this was turned off in 74db5c8c95e,
14aaaa12366f7 applied to limit the maximum memory consumption in rare
conditions, plus some performance patches.

(cherry picked from commit 6e03a68b776dc06826dacbdab26d24a90bb2173b)

Added: 
    

Modified: 
    llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
    llvm/test/DebugInfo/X86/instr-ref-flag.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
index 8f697611a82c0..40770b15aa35b 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
@@ -123,6 +123,11 @@ bool LiveDebugValues::runOnMachineFunction(MachineFunction &MF) {
 }
 
 bool llvm::debuginfoShouldUseDebugInstrRef(const Triple &T) {
+  // Enable by default on x86_64, disable if explicitly turned off on cmdline.
+  if (T.getArch() == llvm::Triple::x86_64 &&
+      ValueTrackingVariableLocations != cl::boolOrDefault::BOU_FALSE)
+    return true;
+
   // Enable if explicitly requested on command line.
   return ValueTrackingVariableLocations == cl::boolOrDefault::BOU_TRUE;
 }

diff  --git a/llvm/test/DebugInfo/X86/instr-ref-flag.ll b/llvm/test/DebugInfo/X86/instr-ref-flag.ll
index 56d34aedabd02..f9d5f99edf77f 100644
--- a/llvm/test/DebugInfo/X86/instr-ref-flag.ll
+++ b/llvm/test/DebugInfo/X86/instr-ref-flag.ll
@@ -13,10 +13,6 @@
 ;; by llc by default, and that it can be turned explicitly on or off as
 ;; desired.
 
-;; Xfail due to faults found in the discussion on
-;; https://reviews.llvm.org/D116821
-; XFAIL: *
-
 ; INSTRREFON: DBG_INSTR_REF
 ; INSTRREFOFF: DBG_VALUE
 


        


More information about the llvm-branch-commits mailing list