Skip to content

Remove intrinsic declarations that became unused after lowering#3674

Open
intwanghao wants to merge 2 commits into
KhronosGroup:mainfrom
intwanghao:erase_unused_func_decl
Open

Remove intrinsic declarations that became unused after lowering#3674
intwanghao wants to merge 2 commits into
KhronosGroup:mainfrom
intwanghao:erase_unused_func_decl

Conversation

@intwanghao

Copy link
Copy Markdown

No description provided.

Signed-off-by: Wang, Hao3 <hao3.wang@intel.com>
Signed-off-by: Wang, Hao3 <hao3.wang@intel.com>
@CLAassistant

CLAassistant commented Apr 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment on lines +805 to +809
for (auto I = M->begin(), E = M->end(); I != E;) {
Function *F = &(*I++);
if (F->isDeclaration() && F->use_empty())
F->eraseFromParent();
}

@MrSidims MrSidims Apr 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If my understanding is correct, as it's spelled right now every unused function declaration will be removed from the module and that is wrong. Please check if removed function is an intrinsic.

@MrSidims
MrSidims requested review from svenvh and vmaksimo April 17, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants