Related articles |
---|
[6 earlier articles] |
Re: Modern compilers for ye olde architectures theom+news@chiark.greenend.org.uk (Theo) (2021-10-06) |
Re: Modern compilers for ye olde architectures laguest@archeia.com (Luke A. Guest) (2021-10-06) |
Re: Modern compilers for ye olde architectures pkk@spth.de (Philipp Klaus Krause) (2021-10-06) |
Re: Modern compilers for ye olde architectures anton@mips.complang.tuwien.ac.at (2021-10-15) |
Re: Modern compilers for ye olde architectures pkk@spth.de (Philipp Klaus Krause) (2021-10-18) |
Re: Modern compilers for ye olde architectures pkk@spth.de (Philipp Klaus Krause) (2021-10-18) |
Re: Modern compilers for ye olde architectures pkk@spth.de (Philipp Klaus Krause) (2021-10-18) |
Re: Modern compilers for ye olde architectures gah4@u.washington.edu (gah4) (2021-10-21) |
Re: Modern compilers for ye olde architectures 480-992-1380@kylheku.com (Kaz Kylheku) (2021-10-22) |
Re: Modern compilers for ye olde architectures dave_thompson_2@comcast.net (2021-11-14) |
From: | Philipp Klaus Krause <pkk@spth.de> |
Newsgroups: | comp.compilers |
Date: | Mon, 18 Oct 2021 09:17:34 +0200 |
Organization: | Compilers Central |
References: | 21-10-007 21-10-012 21-10-015 21-10-024 |
Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="10636"; mail-complaints-to="abuse@iecc.com" |
Keywords: | code, history |
Posted-Date: | 21 Oct 2021 20:08:44 EDT |
Content-Language: | en-US |
In-Reply-To: | 21-10-024 |
Am 15.10.21 um 09:37 schrieb Anton Ertl:
>
> Which poses the question: In your empirical work you stopped at 10^8
> assignments (in some cases, less). How did you get provably optimal
> assignments on the Z80 with its 9 registers?
> CastaƱeda Lozano
On one hand, we have the theoretical bound on the number of assignments,
which is useful for proving that we can be optimal in polynomial time.
On the other hand, getting a provably optimal result when compiling an
individual function is something that is easier to achieve, as the
theoretical bound is a worst case.
* In real programs, most bags in the tree-decomposition will be
smaller than the tree-width allows.
* In real programs, there will be parts of the control-flow graph, where
the number of variables alive is less than (tw(G) + 1)*r.
* In the implementation, we can throw away some assignments early,
without sacrificing optimality, when we know that code generation for
them would be impossible (e.g. in the z80 port, unlike the stm8 port,
code generation cannot handle variables that have some of their bytes
allocated to registers, but other bytes spilt).
In ports of SDCC that use this register allocator (which now is most of
them), when enabling extra comments in the generated assembly code via
--fverbose-asm, SDCC will place a comment at the beginning of each
function stating if the register allocation was provably optimal.
Philipp
Return to the
comp.compilers page.
Search the
comp.compilers archives again.