[llvm] [mfc] Fix RTTI for `InstrProf` intrinsics (PR #83511)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 29 17:09:34 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Mircea Trofin (mtrofin)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/83511.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/IntrinsicInst.h (+16)
``````````diff
diff --git a/llvm/include/llvm/IR/IntrinsicInst.h b/llvm/include/llvm/IR/IntrinsicInst.h
index fbaaef8ea44315..2bd4f94f53170e 100644
--- a/llvm/include/llvm/IR/IntrinsicInst.h
+++ b/llvm/include/llvm/IR/IntrinsicInst.h
@@ -1428,8 +1428,15 @@ class VACopyInst : public IntrinsicInst {
};
/// A base class for all instrprof intrinsics.
+class InstrProfInstBase;
+class InstrProfMCDCBitmapInstBase;
+class InstrProfMCDCCondBitmapUpdate;
class InstrProfInstBase : public IntrinsicInst {
public:
+ static bool classof(const Value *V) {
+ return isa<InstrProfInstBase>(V) || isa<InstrProfMCDCBitmapInstBase>(V) ||
+ isa<InstrProfMCDCCondBitmapUpdate>(V);
+ }
// The name of the instrumented function.
GlobalVariable *getName() const {
return cast<GlobalVariable>(
@@ -1442,8 +1449,17 @@ class InstrProfInstBase : public IntrinsicInst {
};
/// A base class for all instrprof counter intrinsics.
+class InstProfCoverInst;
+class InstProfIncrementInst;
+class InstrProfTimestampInst;
+class InstrProfValueProfileInst;
class InstrProfCntrInstBase : public InstrProfInstBase {
public:
+ static bool classof(const Value *V){
+ return isa<InstProfCoverInst>(V) || isa<InstProfIncrementInst>(V) ||
+ isa<InstrProfTimestampInst>(V) || isa<InstrProfValueProfileInst>(V);
+ }
+
// The number of counters for the instrumented function.
ConstantInt *getNumCounters() const;
// The index of the counter that this instruction acts on.
``````````
</details>
https://github.com/llvm/llvm-project/pull/83511
More information about the llvm-commits
mailing list