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

Most (all?) passes have a maximum LLVM version number of 16. #505

Open
nielsdos opened this issue Jun 16, 2024 · 5 comments
Open

Most (all?) passes have a maximum LLVM version number of 16. #505

nielsdos opened this issue Jun 16, 2024 · 5 comments
Milestone

Comments

@nielsdos
Copy link

Describe the Bug

Most passes have a maximum LLVM version number of 16.
For example, the type based alias analysis pass has:

inkwell/src/passes.rs

Lines 1055 to 1058 in 5c9f7fc

#[llvm_versions(..=16)]
pub fn add_type_based_alias_analysis_pass(&self) {
unsafe { LLVMAddTypeBasedAliasAnalysisPass(self.pass_manager) }
}

However, this pass is also available in LLVM 17 and 18.
Looking at the passes.rs file, it looks like most (or all?) passes define a maximum version number of 16, making them impossible to use with LLVM 17.

To Reproduce

let pm = PassManager::create(());
pm.add_type_based_alias_analysis_pass(); // Doesn't work

Expected Behavior

I expect these passes to be available for LLVM 17.

LLVM Version (please complete the following information):

  • LLVM Version: 17.0.6
  • Inkwell Branch Used: 0.4

Desktop (please complete the following information):

  • OS: Linux

Additional Context

N/A

@TheDan64 TheDan64 added this to the 0.5.0 milestone Jun 17, 2024
@TheDan64
Copy link
Owner

Not sure why this happened, thanks for reporting

@TheDan64 TheDan64 modified the milestones: 0.5.0, 0.6.0 Jul 2, 2024
@vertexclique
Copy link

Are these removed in 18? Don't we need to bump all of them compatible up to 18?

@nielsdos
Copy link
Author

nielsdos commented Jan 8, 2025

Most (all? perhaps some under a different name?) of these optimizations are still available in LLVM 18

@vertexclique
Copy link

I searched for the new pass manager doc, I couldn't find it tbh. They made it into classes where some of these are bundled into as multiple passes. https://releases.llvm.org/18.1.1/docs/NewPassManager.html#just-tell-me-how-to-run-the-default-optimization-pipeline-with-the-new-pass-manager

@vertexclique
Copy link

Btw, setting through PassManagerOptions on the master doesn't apply the underlying passes. We need to write the current pass list in 18 with new methods (whereever they are).

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

No branches or pull requests

3 participants