================
@@ -87,6 +89,10 @@ class LLVM_ABI TargetSubtargetInfo : public MCSubtargetInfo {
 
   virtual bool isXRaySupported() const { return false; }
 
+  /// \returns true if the target intrinsic \p IntrinsicID used by \p CB is
+  /// supported by this subtarget.
+  bool isIntrinsicSupported(unsigned IntrinsicID, const CallBase &CB) const;
----------------
shiltian wrote:

> Ideally this would not depend on codegen. More importantly, this shouldn't 
> depend on a concrete instruction use.

I'm thinking about the case where an intrinsic might only be allowed in certain 
functions, like certain calling conventions, but I can see the argument that 
this would need to be captured by verifier, probably.

https://github.com/llvm/llvm-project/pull/201470
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to