[llvm] [GlobalISel] Remove virtual from GISelValueTracking computeKnownBitsImpl. (PR #158558)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 15 00:19:26 PDT 2025
https://github.com/davemgreen created https://github.com/llvm/llvm-project/pull/158558
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.
>From e6b5dd628c8f7bbf2d007d1815c80269ab45919a Mon Sep 17 00:00:00 2001
From: David Green <david.green at arm.com>
Date: Mon, 15 Sep 2025 08:17:26 +0100
Subject: [PATCH] [GlobalISel] Remove virtual from GISelValueTracking.
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.
---
llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
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);
More information about the llvm-commits
mailing list