From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Cc: theoh@chiark.greenend.org.uk Subject: Re: [9fans] compilers - was GUI toolkit for Plan 9 In-Reply-To: Your message of "Tue, 26 Feb 2002 21:34:51 GMT." <20020226213451.56e87b33.matt@proweb.co.uk> References: <181b9e858518e43368953c1050365780@plan9.bell-labs.com> <20020226213451.56e87b33.matt@proweb.co.uk> From: Theo Honohan Message-Id: Date: Tue, 26 Feb 2002 22:06:42 +0000 Topicbox-Message-UUID: 577e5c96-eaca-11e9-9e20-41e7f4b1d025 Matt H wrote: > > Does anybody know how runtime optimizations such as those in the Crusoe > chip fair at this? If optimization is tricky at compile time sounds like > doing it at runtime must be hairy. Has anyone even tried to run plan9 on a > Crusoe? This is quite an interesting issue. It's actually a lot easier to write a clever interpreter (like the Crusoe chip + software) that optimizes code at runtime than it is to write an offline "binary translator". The most obvious examples are the case of runtime code generation, or self-modifying code; your static analysis of the code you're translating has to be smart enough to see that coming. An interpreter that recognizes and optimizes chunks of code that get called repeatedly is much easier to write. Incidentally, if your job involves having to explain these issues to your boss, it's time to go... :-(