-
Notifications
You must be signed in to change notification settings - Fork 144
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
Redebug #1583
base: main
Are you sure you want to change the base?
Commits on May 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4bb2e2d - Browse repository at this point
Copy the full SHA 4bb2e2dView commit details -
Destroy old compiler debug info mechanism
I'm going to remake it entirely and this is a rare opportunity where I can start mostly from scratch without breaking everything. (tests now fail, so some things are still broken) Bytecode debug info is fine & will be fine since it's fine.
Configuration menu - View commit details
-
Copy full SHA for 35ef606 - Browse repository at this point
Copy the full SHA 35ef606View commit details -
define lambda lists for DIBuilder extern defmethods
to make it easier to use them
Configuration menu - View commit details
-
Copy full SHA for 6fe8690 - Browse repository at this point
Copy the full SHA 6fe8690View commit details -
Start on new debug info system
It works well enough to get function names and arguments into backtraces. Which is really pretty much everything since argument parsing is hard, so. It's probably busted w/r/t inlining.
Configuration menu - View commit details
-
Copy full SHA for 4b4df0a - Browse repository at this point
Copy the full SHA 4b4df0aView commit details -
Disable inlining & enable new DWARF generation
Inlining is where the DWARF generation gets complicated. I also want to pretty much completely overhaul how inlining works.
Configuration menu - View commit details
-
Copy full SHA for ef36513 - Browse repository at this point
Copy the full SHA ef36513View commit details -
integrate arguments processing code into clasp-cleavir more
the *argument-out* thing is a holdover from bclasp
Configuration menu - View commit details
-
Copy full SHA for eca6338 - Browse repository at this point
Copy the full SHA eca6338View commit details -
arguments processor can use LOOP now
since it's only loaded very late after clasp-cleavir, unlike before
Configuration menu - View commit details
-
Copy full SHA for 24d8feb - Browse repository at this point
Copy the full SHA 24d8febView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a4a437 - Browse repository at this point
Copy the full SHA 6a4a437View commit details -
Allow wrong-number-of-arguments to have just a function's name
I want to use the argument processor for inline bodies, so there may not actually be a closure.
Configuration menu - View commit details
-
Copy full SHA for 3326d48 - Browse repository at this point
Copy the full SHA 3326d48View commit details -
Move register-save-area handling into translate
It's not really part of argument parsing, so it doesn't belong in the "calling convention" code at all.
Configuration menu - View commit details
-
Copy full SHA for cb6ed18 - Browse repository at this point
Copy the full SHA cb6ed18View commit details -
Make the argument processor for-effect
I don't think it has been able to return false for years, and I'm not sure why it ever would.
Configuration menu - View commit details
-
Copy full SHA for 4571a70 - Browse repository at this point
Copy the full SHA 4571a70View commit details -
reorient optional argument processor to not compute nremaining
I'm going to have all these return a list of arguments instead, so returning the number remaining is no good.
Configuration menu - View commit details
-
Copy full SHA for 1af73df - Browse repository at this point
Copy the full SHA 1af73dfView commit details -
Integrate argument processing into clasp-cleavir
and remove the confusing calling-convention stuff. And unify the code so that the required-and-optionals case works efficiently without having its own code. Moving towards being able to process arguments in the middle of a function (for an inline call).
Configuration menu - View commit details
-
Copy full SHA for a365f50 - Browse repository at this point
Copy the full SHA a365f50View commit details -
have argument parser return arguments instead of side effecting
should make it easier to use for local calls. bonus: no weird dependence on *datum-values* in xep layouter.
Configuration menu - View commit details
-
Copy full SHA for d30902f - Browse repository at this point
Copy the full SHA d30902fView commit details -
Have argument processor handle casting
This will be needed to use it for local calls. I skipped &key because I couldn't bear to make that code even crazier. Also, &rest arguments are always boxed, which we could maybe fix at some point. In the future we should probably force suppliedp parameters to be boolean rtype, cos what else would they even be.
Configuration menu - View commit details
-
Copy full SHA for 6fb6158 - Browse repository at this point
Copy the full SHA 6fb6158View commit details -
No more separate argument processing for local calls
Unifying this makes translate much less messy with all that duplicate code, and makes it possible to local call anything, including functions with &rest and/or &key parameters. Also means we don't have to allocate a closure for local calls ever - that was super dumb and I'm disappointed in myself for ever thinking it was a good idea. Argument parsing for local calls is moved into the caller in all cases now. That may be a bit suboptimal for local functions that are called in more than one place, since the parsing code is duplicated. I really doubt that will be a big deal except _maybe_ for functions with &key, since key parsing is actually a fair bit of code. But &key functions are already kind of doomed as far as optimization goes, and local functions that are called in multiple places are rare to begin with (only arising from flet/labels, versus the much more common type checkers and m-v-bind lambdas) so I'm not too worried. The Right Thing To Do long term is probably to do as karlosz suggested years ago and represent XEPs explicitly in the IR. A shorter term fix would be to create pseudo-XEPs for these functions - "pseudo" in that they would parse arbitrary arguments, but take the environment as individual arguments instead of as an allocated closure.
Configuration menu - View commit details
-
Copy full SHA for 6bc98e2 - Browse repository at this point
Copy the full SHA 6bc98e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 013faca - Browse repository at this point
Copy the full SHA 013facaView commit details -
Use LLVM's poison instead of undef in most places
poison seems to be the wave of the future (LLVM docs currently say to use it instead of undef whenever possible). It's "more undefined" than undef, so it might help LLVM passes do more optimization. Though I don't know how much it matters in practice. I left in a few undefs I didn't immediately understand the context of, but those can probably be poison too.
Configuration menu - View commit details
-
Copy full SHA for 41c8c91 - Browse repository at this point
Copy the full SHA 41c8c91View commit details -
Make backtraces a little better at optimized code
When LLVM optimization is on, it will often inline functions, and in particular will inline core functions into their XEPs. The DWARF information will reflect this inlining, so the address range for a given return address may be of the inline function body rather than that of the actual entry point. And that would break backtraces. This fix ignores the address ranges of the return address, instead just checking the ranges of the object file's literal functions. That works, but ideally we would use the DWARF information to give us information about inlined functions. Also, with optimization on a few tests on backtraces fail, so that also needs fixing.
Configuration menu - View commit details
-
Copy full SHA for 2f9ed4f - Browse repository at this point
Copy the full SHA 2f9ed4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d28a1e4 - Browse repository at this point
Copy the full SHA d28a1e4View commit details -
Move LLVM optimization outside of with-module macro
Doing it in a macro is just kind of error prone. COMPILE was not doing optimization because the macro didn't have an optimizer listed. And what kind of non-LLVM optimizer function would we even use to optimize an LLVM module?
Configuration menu - View commit details
-
Copy full SHA for 8ef8e97 - Browse repository at this point
Copy the full SHA 8ef8e97View commit details -
Make arguments available in optimized function backtraces
As long as the register save area is generated we should be able to get arguments. I honestly don't understand why the meat of this change - getting the function description from the closure - is necessary, since I would think the fd is available from the entry point. Whatever.
Configuration menu - View commit details
-
Copy full SHA for f36d8b6 - Browse repository at this point
Copy the full SHA f36d8b6View commit details -
Actually use LLVM optimizations
buildPerModuleDefaultPipeline does not operate by side effect. We should probably wrap all the optimization pipeline/passes stuff, or at least what we use, so as to experiment with what actually helps. Right now we just do -O3 depending on a dynamic variable, which isn't amazing. I also disabled the inline threshold change. I'm seeing plenty of inlining even with the default threshold.
Configuration menu - View commit details
-
Copy full SHA for 8f4d012 - Browse repository at this point
Copy the full SHA 8f4d012View commit details -
Delete inline AST re-sourcing code
It's ugly and I have a better way. Hopefully. Not yet. This means that inline function source locations are in the wrong place.
Configuration menu - View commit details
-
Copy full SHA for 5fd7f04 - Browse repository at this point
Copy the full SHA 5fd7f04View commit details -
new debuginfo: handle functions with different source files
you know, for inlining. This fixes source info for inlined calls. (If LLVM is doing the inlining, anyway.)
Configuration menu - View commit details
-
Copy full SHA for 97617d0 - Browse repository at this point
Copy the full SHA 97617d0View commit details -
Make defaultEntryAddress/arityEntryAddress functions non virtual
arityEntryAddress is something I added while debugging backtraces and I suppose we may as well keep it around.
Configuration menu - View commit details
-
Copy full SHA for 9d37198 - Browse repository at this point
Copy the full SHA 9d37198View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3b1ff4 - Browse repository at this point
Copy the full SHA d3b1ff4View commit details -
clasp-cleavir: allow non-object rtypes in come-from
having them is probably inefficient but there's no reason we can't generate the appropriate code to box and unbox. The ANSI test MISC-105 was failing without this, because with later inlining an unwind actually remains an unwind. Something to look into before merge.
Configuration menu - View commit details
-
Copy full SHA for 2a081e7 - Browse repository at this point
Copy the full SHA 2a081e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64fa5e1 - Browse repository at this point
Copy the full SHA 64fa5e1View commit details -
Handle logical pathnames in debug info at lower level
rather than explicitly specifying :source or w/e
Configuration menu - View commit details
-
Copy full SHA for 889f73b - Browse repository at this point
Copy the full SHA 889f73bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a6247f - Browse repository at this point
Copy the full SHA 9a6247fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 119fe7e - Browse repository at this point
Copy the full SHA 119fe7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6bce0d9 - Browse repository at this point
Copy the full SHA 6bce0d9View commit details -
Output DWARF info for local variables
Nothing seems to be showing up, though. Very weird.
Configuration menu - View commit details
-
Copy full SHA for 5b40490 - Browse repository at this point
Copy the full SHA 5b40490View commit details
Commits on May 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9d9e41e - Browse repository at this point
Copy the full SHA 9d9e41eView commit details -
Define direct pathname reader for SPIs
Saves a bunch of code to go through file scopes, which are arguably unnecessary anyway, and definitely an irrelevant implementation detail.
Configuration menu - View commit details
-
Copy full SHA for ad39129 - Browse repository at this point
Copy the full SHA ad39129View commit details -
Configuration menu - View commit details
-
Copy full SHA for abd44ac - Browse repository at this point
Copy the full SHA abd44acView commit details