Article View: gnu.gcc.help
Article #52986optimizations with virtual registers
From: dong
Date: Sun, 29 Mar 1992 07:46
Date: Sun, 29 Mar 1992 07:46
30 lines
1632 bytes
1632 bytes
Dear support, When porting gcc for an architecture which has only three hard registers, I noticed that gcc would ignore some optimizations if there are not enough registers. According to this observation, I am thinking about providing some virtual registers. Since these are actually memory cells, I definately don't want gcc to use them for general allocation, but only for optimizations. Here is an example: if a program has 3 dummy variables, gcc will put them into 3 registers in order to save a lot of loads/stores. But if there are only 2 registers available for this purpose, gcc will not do such optimization at all. It would be better if we provide a virtual register, so that gcc can still do the optimization, but only 2 of them are actually optimized. Can this scheme provide better output ? If so, how can I tell gcc to use these virtual registers only during optimizations ? I think it would be better, for the above example, if gcc can optimize the first 2 variables into registers and do load/store for the last one. Thanks Dong Lin
Technical Details
Message-ID:
<9203292346.AA19660@vlsi.cs.caltech.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!vlsi.cs.caltech.edu!dongShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,984c2af9be2c7012,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-03-28 23:46:07 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!vlsi.cs.caltech.edu!dong From: dong@vlsi.cs.caltech.edu Subject: optimizations with virtual registers Message-ID: <9203292346.AA19660@vlsi.cs.caltech.edu> Sender: daemon@cis.ohio-state.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sun, 29 Mar 1992 07:46:07 GMT Lines: 30