Repository navigation
Inline bignum - #1872
Merged
Merged
Inline bignum#1872
Conversation
and teach the compiler a bit about bignums, and expose select instructions finally
it's fairly common to be able to derive that things are integers but not necessarily fixnums, e.g. fixnum sums in loops. In that case it makes sense to give LLVM as much information as we can.
Not sure why this was disabled. I think maybe a holdover from how we used to do our "intrinsics" as being embedded into the module? In any case, this lets local functions (in the Lisp sense) be inlined, including type checkers. Very nice. I'm leaving the PipelineTuningOptions there in case we want to do some actual tuning later.
let LLVM know that we're using the index that's bounded, etc. with this change in place, a basic loop like (loop for e across x do (print e)) where x is known simple-vector can be done without any of our intrinsics in the fast path. It does still use an llvm.sadd but I figure LLVM knows that one pretty dang well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inlines bignum creation (for fixnum overflow, not generally) and comparisons, which makes some basic loops work much better.
Also turns LLVM-level inlining back on which we have had disabled for several years now. Shouldn't affect debug info since it'll just be local functions anyway.