[llvm] [TLI] Add getLibFunc that accepts an Opcode and scalar Type. (PR #75919)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 08:48:37 PST 2023


================
@@ -156,6 +156,10 @@ class TargetLibraryInfoImpl {
   /// FDecl is assumed to have a parent Module when using this function.
   bool getLibFunc(const Function &FDecl, LibFunc &F) const;
 
+  /// Searches for a function name using an Instruction \p Opcode.
+  /// Currently, only the frem instruction is supported.
+  bool getLibFunc(unsigned int Opcode, Type *ScalarTy, LibFunc &F) const;
----------------
paulwalker-arm wrote:

I'd just use `Ty` instead of `ScalarTy` because the interface doesn't care what the type is.

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


More information about the llvm-commits mailing list