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
add an inductive range check elimination pass #42573
Conversation
Nice! Could you time the passes during sysimage compilation? So that we can see how much additional time this takes. |
@nanosoldier |
Can you post some benchmark numbers from your test-cases? |
Core.Compiler: 45.6049 seconds Generating REPL precompile statements... 31/31 |
Test Case 1:
Original:
Original + IRCE:
Original + inbounds:
Test Case 2:
Original:
Original + IRCE:
Original + inbounds:
|
Your package evaluation job has completed - possible new issues were detected. A full report can be found here. |
@nanosoldier |
Something went wrong when running your job:
Unfortunately, the logs could not be uploaded. |
@vtjnash can you upload the logs? and maybe we should remove @christopher-dG from the ping list. |
Is this related: Otherwise, all others seem to be noise |
As stated in #42521, using
@inbounds
to denote areas where bounds checks are necessary is dangerous. LLVM provides an InductiveRangeCheckElimination pass which can extract some bounds checks which are known to be safe.Godbolt Links:
Original: https://godbolt.org/z/YY3WrYThh
With
@inbounds
: https://godbolt.org/z/cEW9GTsT3Original+IRCE: https://godbolt.org/z/j1YndbzrE
The pass makes the control flow graph a little messier than
@inbounds
does, but does allow vectorization that is not allowable when bounds checks are present.