freenode/#sicl - IRC Chatlog
Search
6:19:37
beach
Random ideas about register allocation. I have been pondering how to express the x86 constraint that for a typical operation, the first operand must be in the same register as the result. I think I can express that constraint by introducing anonymous registers with an identity. So if I have z <- op(x, y), I can express that as R <- x, R <- op(R, y), z <- R.
6:20:06
beach
Then the problem of register allocation is reduced to assigning anonymous registers to real ones.
6:20:56
beach
I would have a mix between anonymous and real registers in LIR because instructions such as the FUNCALL-INSTRUCTION require arguments to be assigned to specific registers.
6:29:41
beach
Also, it is not quite correct to say that a lexical variable is "assigned to a register", because at any program point, several registers can contain the value of that variable. Take my previous example. A valid solution might have x in some register R' /= R before the operation. Then R <- x will make both R and R' contain the value of x.
6:30:30
beach
I mention that because I think some published techniques for register allocation assume at most one register for each variable.
6:35:00
beach
Hmm. So I think I can make it such that lexical variables appear only as either input or output (but not both) of ASSIGNMENT-INSTRUCTIONs.
6:38:11
beach
Then I can determine a cost of the assignment instruction for different cases. Let's say we have an ASSIGNMENT-INSTRUCTION R <- v. Then if before that instruction v is already in R, then the cost is 0. If v is in a register other than R, the cost is (say) 1. Finally if v is in memory, the cost is higher, say 10.
6:39:33
beach
Not sure this information will help me find a complete technique for register allocation, but it might be a valuable observation.
15:09:27
alandipert
beach i hadn't thought about that observation before that you made, that variables may occupy > 1 registers. but it makes sense
16:19:53
beach
ebrasca: Most existing Common Lisp implementation were largely written before CLOS was part of the language.
16:20:58
beach
Why do you need a LAP. Is it because Mezzano has lots of "assembly code" written manually?
16:21:29
beach
Yes, but the implementation itself is often written in layers, starting with a subset of the language that does not contain CLOS.
16:27:34
beach
You will have a bigger problem, I think, in that you would have to retarget the compiler.
16:29:34
jackdaniel
I believe that clean design will enable some optimizations which would be too cumbersome to implement in sbcl
16:29:38
beach
I want SICL to be the basis for a safe operating system, and I won't allow a user to crash the entire system.
16:31:01
beach
That's the plan, but it won't be called that then. SICL is just a Common Lisp implementation. The multi-user operating system that it will be the basis for is CLOSOS.
16:36:29
jackdaniel
if you are trying to recruit beach I think that it will be hard (given how full is his plate)
16:39:26
beach
ebrasca: Let me try... I want CLOSOS to be a safe, multi-user operating system with universal persistence, using a combination of access-control lists (ACLs) and capabilities for protection. It will have first-class global environments to isolate users from each other, and to prevent ordinary users from creating unsafe code, say by manipulating the code generator of the compiler.
16:41:16
beach
ebrasca: There is no point in trying to compare projects on a single dimension like "best".
16:42:02
beach
Whether one project is "better" than the other has to do with how well it corresponds to your objectives.
16:43:54
beach
I am not the kind of person to denigrate a project just in order to push my own agenda. So I can honestly say that Mezzano, SBCL, ECL, etc. are all great projects, but they don't correspond to the goals I want with SICL and CLOSOS.
16:47:19
jackdaniel
ebrasca: think of it as whole operating system and userland implemented in the kernel
16:52:04
beach
That's why I ask you about definitions. If that is all the supervisor does, and it does it in a way that is not particular, then sure, CLOSOS and every OS has a supervisor.
17:05:37
ebrasca
If you don't have distinction between primary and secondary memory how do you make sure you don't lose data?
17:06:18
beach
You can lose a few minutes of data, just like you can if you haven't saved your editor buffer and you turn off the power.
17:10:12
alandipert
wow. i have something like a very rough but complete ELS paper draft, i would be extremely grateful for any feedback on it: https://tailrecursion.com/~alan/documents/jacl-els-2020-draft.pdf
17:10:15
beach
If you read the chapter on checkpointing, you will see that only the page table needs to be in SSD. But also, technology is improving. That's just a problem with the current technology.
17:11:40
beach
alandipert: What I can offer is this: You upload the paper by the deadline. After that, the site allows you to upload modified versions for quite some time.
17:11:57
beach
alandipert: So when I have uploaded my own, I can start to work on yours and that of my favorite coauthor.
17:12:50
alandipert
oh, any time you can devote to helping me would be more than welcome, but i would hate for you to have the idea that i expect such help :-) you have helped me so much already, and if this doesn't get accepted i'll be OK
17:13:46
beach
What I am telling you is that it is going to take them time to assign referees and have the referees do their job.
17:14:46
beach
So to gain some time, it is optimal (for me) to wait until after the deadline, so that I don't have to rush with my own stuff.
17:15:23
alandipert
makes sense. if nothing else i still have a bunch of remaining work for my bibliography
17:16:04
beach
Plus, there is this concept of "accept"-able. When additional improvements are not likely to change the decision of the program committee, you can submit the paper.
17:20:21
beach
alandipert: Oh, and if you submit your link to #lisp, you will have more people help you. For instance flip214 is an excellent proofreader.
17:20:48
ebrasca
beach: I like Single address space , Object store based on attributes and Single memory abstraction.