We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f38552b commit 1b35cf1Copy full SHA for 1b35cf1
IGC/VectorCompiler/lib/GenXOpts/CMTrans/CMImpParam.cpp
@@ -588,6 +588,10 @@ CallGraphNode *CMImpParam::ProcessKernel(Function *F) {
588
F->getParent()->getFunctionList().insert(F->getIterator(), NF);
589
NF->takeName(F);
590
NF->setSubprogram(F->getSubprogram()); // tranfer debug-info
591
+ // DISubprogram must be unique to the module.
592
+ // Since F can be left as a "hanging" entity in the module - we preserve
593
+ // IR correctness by detaching DISubprogram node from it
594
+ F->setSubprogram(nullptr);
595
596
// Now to splice the body of the old function into the new function
597
NF->getBasicBlockList().splice(NF->begin(), F->getBasicBlockList());
0 commit comments