Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM full optimization #869

Merged
merged 4 commits into from
Apr 20, 2020
Merged

LLVM full optimization #869

merged 4 commits into from
Apr 20, 2020

Conversation

yukoba
Copy link
Contributor

@yukoba yukoba commented Apr 16, 2020

This pull request is for LLVM full optimization.

I added two functions.

  1. JavaCPPLLVMOptimizeModule(): This function does the standard LLVM optimization, and based on main() of llvm/tools/opt/opt.cpp.
  2. JavaCPPLLVMCreateOptimizedJITCompilerForModule(): This function is similar to LLVMCreateJITCompilerForModule() but does CPU specific optimization.

I added JavaCPPLLVM prefix to avoid the conflict against LLVM-C function names.

@saudet
Copy link
Member

saudet commented Apr 16, 2020

I don't see any LLVMOptimizeModule() or LLVMCreateOptimizedJITCompilerForModule() functions.
How do those names conflict?

@yukoba
Copy link
Contributor Author

yukoba commented Apr 16, 2020

Yes, LLVM does not have LLVMOptimizeModule() and LLVMCreateOptimizedJITCompilerForModule(). But if LLVM creates those functions in the future, JavaCPP has to change the name and cannot keep the upper compatibility. Therefore I added JavaCPPLLVM prefix.

@saudet
Copy link
Member

saudet commented Apr 16, 2020

Right, but we're not adding to the C API, so we don't need to follow its conventions. We can also make it more object-oriented. Let me propose something.

@yukoba
Copy link
Contributor Author

yukoba commented Apr 16, 2020

Thank you. Please merge.

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.

None yet

2 participants