Skip to content

Add target attributes to LLVM IR Module getting optimized#1103

Open
yashssh wants to merge 1 commit intonumba:mainfrom
yashssh:yashwants/target-attr
Open

Add target attributes to LLVM IR Module getting optimized#1103
yashssh wants to merge 1 commit intonumba:mainfrom
yashssh:yashwants/target-attr

Conversation

@yashssh
Copy link
Contributor

@yashssh yashssh commented Nov 26, 2024

LLVM IR that is passed down from Numba frontend to LLVM backend does not contain some basic target specific attributes(target-cpu, target-features) which is added by Clang frontend (when compiling C++) or either by tools such as opt and llc when optimizing the LLVM-IR directly with the help of cli flags.

I have mimicked the flow of opt optimizer from llvm, which adds these details to the IR module before running the optimization pipeline.

This change shouldn't affect any functionality and correctness, it's just to add more details to the IR involved and to make it more more verbose and portable across tools.

@yashssh
Copy link
Contributor Author

yashssh commented Jun 17, 2025

Ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants