LLVM 20.0.0git
IntrinsicInst.h
Go to the documentation of this file.
1//===- IntrinsicInst.h ------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_SANDBOXIR_INTRINSICINST_H
10#define LLVM_SANDBOXIR_INTRINSICINST_H
11
14
15namespace llvm::sandboxir {
16
17class IntrinsicInst : public CallInst {
19
20public:
22 return cast<llvm::IntrinsicInst>(Val)->getIntrinsicID();
23 }
24 bool isAssociative() const {
25 return cast<llvm::IntrinsicInst>(Val)->isAssociative();
26 }
27 bool isCommutative() const {
28 return cast<llvm::IntrinsicInst>(Val)->isCommutative();
29 }
30 bool isAssumeLikeIntrinsic() const {
31 return cast<llvm::IntrinsicInst>(Val)->isAssumeLikeIntrinsic();
32 }
35 }
36 static bool classof(const Value *V) {
37 auto *LLVMV = V->Val;
38 return isa<llvm::IntrinsicInst>(LLVMV);
39 }
40};
41
42} // namespace llvm::sandboxir
43
44#endif // LLVM_SANDBOXIR_INTRINSICINST_H
#define I(x, y, z)
Definition: MD5.cpp:58
A wrapper class for inspecting calls to intrinsic functions.
Definition: IntrinsicInst.h:48
static bool mayLowerToFunctionCall(Intrinsic::ID IID)
Check if the intrinsic might lower into a regular function call in the course of IR transformations.
static bool mayLowerToFunctionCall(Intrinsic::ID IID)
Definition: IntrinsicInst.h:33
static bool classof(const Value *V)
Definition: IntrinsicInst.h:36
Intrinsic::ID getIntrinsicID() const
Definition: IntrinsicInst.h:21
A SandboxIR Value has users. This is the base class.
Definition: Value.h:63
llvm::Value * Val
The LLVM Value that corresponds to this SandboxIR Value.
Definition: Value.h:103
Context & Ctx
All values point to the context.
Definition: Value.h:172