[llvm] 42d9232 - [TargetInstrInfo][NFC] Don't restrict isAddImmediate description to physical registers (#72357)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 06:44:16 PST 2023


Author: Alex Bradbury
Date: 2023-11-16T14:44:11Z
New Revision: 42d9232a0259b33da89d32e4ebca5d5f497c5f5e

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

LOG: [TargetInstrInfo][NFC] Don't restrict isAddImmediate description to physical registers (#72357)

None of the in-tree implementations have different behaviour for
physical vs virtual registers, and it seems would work equally well if
used with virtual registers. As such, perhaps it's simplest to just drop
that part of the doc comment.

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/TargetInstrInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/TargetInstrInfo.h b/llvm/include/llvm/CodeGen/TargetInstrInfo.h
index c83c11d4e776fab..fe130d282ded15e 100644
--- a/llvm/include/llvm/CodeGen/TargetInstrInfo.h
+++ b/llvm/include/llvm/CodeGen/TargetInstrInfo.h
@@ -1060,9 +1060,9 @@ class TargetInstrInfo : public MCInstrInfo {
   }
 
   /// If the specific machine instruction is an instruction that adds an
-  /// immediate value and a physical register, and stores the result in
-  /// the given physical register \c Reg, return a pair of the source
-  /// register and the offset which has been added.
+  /// immediate value and a register, and stores the result in the given
+  /// register \c Reg, return a pair of the source register and the offset
+  /// which has been added.
   virtual std::optional<RegImmPair> isAddImmediate(const MachineInstr &MI,
                                                    Register Reg) const {
     return std::nullopt;


        


More information about the llvm-commits mailing list