File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
WrapperLLVM/include/llvmWrapper/IR Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ namespace llvm {
84
84
llvm::BasicBlock* BB = const_cast <llvm::BasicBlock*>(&*BBI);
85
85
for (auto II = BB->begin (); II != BB->end (); II++)
86
86
{
87
+ if (IGCLLVM::isDebugOrPseudoInst (*II))
88
+ continue ;
87
89
if (llvm::GenIntrinsicInst* pIntrinsic = llvm::dyn_cast<llvm::GenIntrinsicInst>(II))
88
90
{
89
91
if (CheckSendMsg && isSendMessage (pIntrinsic))
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ SPDX-License-Identifier: MIT
10
10
#define IGCLLVM_IR_INSTRUCTIONS_H
11
11
12
12
#include " llvm/Config/llvm-config.h"
13
+ #include " llvm/IR/IntrinsicInst.h"
13
14
#include " llvm/IR/Instructions.h"
14
15
#include " llvm/IR/User.h"
15
16
@@ -79,6 +80,15 @@ namespace IGCLLVM
79
80
return false ;
80
81
#else
81
82
return llvm::isa<llvm::FreezeInst>(I);
83
+ #endif
84
+ }
85
+
86
+ inline bool isDebugOrPseudoInst (llvm::Instruction& I)
87
+ {
88
+ #if LLVM_VERSION_MAJOR < 14
89
+ return llvm::isa<llvm::DbgInfoIntrinsic>(&I);
90
+ #else
91
+ return I.isDebugOrPseudoInst ();
82
92
#endif
83
93
}
84
94
}
You can’t perform that action at this time.
0 commit comments