[llvm] [AMDGPU] Add target hook to isGlobalMemoryObject (PR #112781)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 21:51:18 PST 2025


================
@@ -136,6 +136,10 @@ class TargetInstrInfo : public MCInstrInfo {
                                          const TargetRegisterInfo *TRI,
                                          const MachineFunction &MF) const;
 
+  /// Returns true if MI is an instruction we are unable to reason about
+  /// (like a call or something with unmodeled side effects).
+  virtual bool isGlobalMemoryObject(const MachineInstr *MI) const;
----------------
arsenm wrote:

This should follow the pattern that isCopyInstr uses. Have the virtual overridable Impl function, with the generic cases handled directly

https://github.com/llvm/llvm-project/pull/112781


More information about the llvm-commits mailing list