Deutsch English Français Italiano |
<102sb0t$2gs7d$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Stephen Fuld <sfuld@alumni.cmu.edu.invalid> Newsgroups: comp.arch Subject: Re: Why I've Dropped In Date: Tue, 17 Jun 2025 11:09:33 -0700 Organization: A noiseless patient Spider Lines: 46 Message-ID: <102sb0t$2gs7d$1@dont-email.me> References: <0c857b8347f07f3a0ca61c403d0a8711@www.novabbs.com> <dd6e28b90190e249289add75780b204a@www.novabbs.com> <ec821d1d64555055271e3b72f241d39b@www.novabbs.com> <8addb3f96901904511fc9350c43917ef@www.novabbs.com> <102b5qh$1q55a$2@dont-email.me> <48c03284118d9d68d6ecf3c11b64a76b@www.novabbs.com> <577246053d33788ee71e2e04e8466450@www.novabbs.org> <jwvecvjacof.fsf-monnier+comp.arch@gnu.org> <102qg7a$1vq33$1@dont-email.me> <9668ceb1d550abdc26c923a6405b7343@www.novabbs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 17 Jun 2025 20:09:33 +0200 (CEST) Injection-Info: dont-email.me; posting-host="3b78fddcea9d6feb6d69f696c0bca168"; logging-data="2650349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4MKWcDdhIyKi2esUqjsMfKPrGEYQaDu8=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:/3svqXXzxSJLgfnW86p/pFNQG8g= Content-Language: en-US In-Reply-To: <9668ceb1d550abdc26c923a6405b7343@www.novabbs.org> On 6/17/2025 10:45 AM, MitchAlsup1 wrote: > On Tue, 17 Jun 2025 1:26:01 +0000, Stephen Fuld wrote: > >> On 6/16/2025 9:17 AM, Stefan Monnier wrote: >>>>> Therefore, I reduced the index register and base register fields to >>>>> three bits each, using only some of the 32 integer registers for those >>>>> purposes. >>>> This is going to hurt register allocation. >>> >>> I vaguely remember reading somewhere that it doesn't have to be too bad: >>> e.g. if you reduce register-specifiers to just 4bits for a 32-register >>> architecture and kind of "randomize" which of the 16 values refer to >>> which of the 32 registers for each instruction, it's fairly easy to >>> adjust a register allocator to handle this correctly (assuming you >>> choose your instructions beforehand, you simply mark, for each >>> instructions, the unusable registers as "interfering"), and the end >>> result is often almost as good as if you had 5bits to specify >>> the registers. >> >> I can see that it isn't too hard on the logic for the register >> allocator, > > You are missing the BIG problem:: > > Register allocator allocated Rk for calculation j and later allocates > Rm for instruction p, then a few instructions later the code generator > notices that Rk and RM need to be paired or shared and they were not > originally. How does on fix this kind of problem without adding more > passes over the intermediate representation ?? Good point. Thanks. > >> but I suspect it will lead to more register saving and >> restoring. > > And reg-reg MOVment. Yes. I should have mentioned that as well. -- - Stephen Fuld (e-mail address disguised to prevent spam)