LLVM optimize - #1862
Merged
Merged
LLVM optimize#1862
Conversation
and optimize when doing compile-file, obviously. If you think that's bad just wait for the next commit. Basically we should verify before we pass to LLVM optimizations, because if those are wrong we're debugging LLVM rather than ourselves. And, we shouldn't verify or optimize until the module is actually done, so the debug info is output and the literals variable is swapped out and etc.
jesus tapdancing christ SO: In 434d943 yitzi updated us to use the snazzy new PassManager introduced around LLVM 17. Unfortunately, he misread the docs, or made a typo, or something: the code he wrote built an analysis and optimization pipeline, and then dropped it to instead run a default-constructed, i.e. empty, pipeline. I don't blame him for this. LLVM is inscrutable at the best of times. I do, however, blame myself, for not noticing in the THREE YEARS it's been since then. Holy shit, man. I think I was inured to seeing crappy disassemblies so I didn't notice, and I've been working on bytecode and all, but shit. Straight fucked this one. My Bad. at least it's actually fixed now. I'm not sure I can put in a test for a problem this stupid.
now that LLVM actually friggin optimizes, it quite reasonably turns the funcalls into tail calls unless we disable optimizations. debug 3 does that per the perform-optimization policy that sticks an optnone on.
with optimization on this now matters, e.g. ANSI test misc.198
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.
We haven't actually been optimizing with LLVM for a while due to a remarkably catastrophic typo. This fixes that.