Skip to content

Conversation

davemgreen
Copy link
Collaborator

As far as I understand, GISelValueTracking::computeKnownBitsImpl does not need to be virtual, as no-one is specializing / overriding it, which means it is not necessary for the destructor either.

As far as I understand, GISelValueTracking::computeKnownBitsImpl does not need
to be virtual, as noone is specializing / overriding it, which means it is not
necessary for the destructor either.
@llvmbot
Copy link
Member

llvmbot commented Sep 15, 2025

@llvm/pr-subscribers-llvm-globalisel

Author: David Green (davemgreen)

Changes

As far as I understand, GISelValueTracking::computeKnownBitsImpl does not need to be virtual, as no-one is specializing / overriding it, which means it is not necessary for the destructor either.


Full diff: https://github.com/llvm/llvm-project/pull/158558.diff

1 Files Affected:

  • (modified) llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h (+3-4)
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h b/llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h
index 3bf9d694b1b21..2db66ba9584a3 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h
@@ -58,15 +58,14 @@ class LLVM_ABI GISelValueTracking : public GISelChangeObserver {
 
 public:
   GISelValueTracking(MachineFunction &MF, unsigned MaxDepth = 6);
-  virtual ~GISelValueTracking() = default;
+  ~GISelValueTracking() = default;
 
   const MachineFunction &getMachineFunction() const { return MF; }
 
   const DataLayout &getDataLayout() const { return DL; }
 
-  virtual void computeKnownBitsImpl(Register R, KnownBits &Known,
-                                    const APInt &DemandedElts,
-                                    unsigned Depth = 0);
+  void computeKnownBitsImpl(Register R, KnownBits &Known,
+                            const APInt &DemandedElts, unsigned Depth = 0);
 
   unsigned computeNumSignBits(Register R, const APInt &DemandedElts,
                               unsigned Depth = 0);

@davemgreen davemgreen merged commit 5f8bce4 into llvm:main Sep 17, 2025
11 of 12 checks passed
@davemgreen davemgreen deleted the gh-gi-knownbitsvirtual branch September 17, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants